This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
vimrc
230 lines (199 loc) · 5.02 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
" security
set secure
set nomodeline
" start Neobundle
if has("vim_starting")
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#begin(expand("~/.vim/bundle"))
NeoBundleFetch "Shougo/neobundle.vim"
" plugins with no config
NeoBundle "alunny/pegjs-vim"
NeoBundle "cocopon/iceberg.vim"
NeoBundle "dockyard/vim-easydir"
NeoBundle "flazz/vim-colorschemes"
NeoBundle "junegunn/goyo.vim"
NeoBundle "kshenoy/vim-signature"
NeoBundle "lluchs/vim-wren"
NeoBundle "sheerun/vim-polyglot"
NeoBundle "sjl/vitality.vim"
NeoBundle "tpope/vim-commentary"
NeoBundle "tpope/vim-endwise"
NeoBundle "tpope/vim-eunuch"
NeoBundle "tpope/vim-fugitive"
NeoBundle "tpope/vim-repeat"
NeoBundle "vim-scripts/brainfuck-syntax"
NeoBundle "wakatime/vim-wakatime"
" plugins that require other things
if has("python")
NeoBundle "editorconfig/editorconfig-vim"
NeoBundle "Valloric/MatchTagAlways"
endif
" reasonable defaults
set backspace=indent,eol,start
set autoread
set autochdir
set history=1000
set viminfo^=!
nnoremap Y y$
nnoremap 0 ^
nnoremap - $
set wildignore+=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/*
set wildignore+=*/node_modules/*
set wildignore+=*.swp,*~,._*
if has("cryptmethod")
set cryptmethod=blowfish2
endif
set ttymouse=xterm2
set mouse=
set mousehide
set nrformats-=octal
autocmd BufEnter, BufWinEnter * silent! checktime %
" indenting
set autoindent
set shiftround
" better <Esc>
set ttimeout
set ttimeoutlen=50
" search
set ignorecase
set smartcase
set incsearch
set hlsearch
set gdefault
" display stuff
set laststatus=2
set ruler
set showcmd
set number
set noerrorbells
set visualbell
set t_Co=256
if has("syntax")
syntax on
set synmaxcol=1000
endif
set nolist
set listchars=tab:▸\ ,eol:¬,trail:·,nbsp:·
if has("gui_running")
set title
set guifont=Inconsolata:h16
set antialias
set guioptions-=T
set guioptions-=r
set guioptions-=L
highlight Cursor guifg=black guibg=grey
set guicursor=n-c-v:block-Cursor-blinkon0
set guicursor+=i:ver10-Cursor
else
set notitle
endif
" wildin'
set nowildmenu
" cursor position
set cursorline
set scrolloff=4
set sidescroll=1
set sidescrolloff=15
" better wrapping
set wrap linebreak
set showbreak=" "
" splits
set splitbelow
set splitright
" switch to a tab
set switchbuf=usetab
" english
if has("spell")
set spelllang=en_us
endif
" Git commit messages with spelling and automatic insert mode
if has("spell")
au BufNewFile,BufRead COMMIT_EDITMSG setlocal spell
endif
au BufNewFile,BufRead COMMIT_EDITMSG call feedkeys("ggi", "t")
" leader stuff
let mapleader = "\<Space>"
nnoremap <Leader>h :noh<CR>
nmap <Leader><Leader> :w<CR>:noh<CR>
" better vertical movement
noremap j gj
noremap k gk
" there is no escape
inoremap jk <esc>
" stay in visual mode when indenting
vnoremap < <gv
vnoremap > >gv
" these trip me up
nnoremap Q <nop>
nnoremap K <nop>
" buffers
set hidden
" not sure why this was happening...
nnoremap <Esc> <nop>
" Indent Guides
NeoBundle "nathanaelkane/vim-indent-guides"
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1
" Airline
NeoBundle "bling/vim-airline"
let g:airline_theme="jellybeans"
let g:airline_left_sep = ""
let g:airline_right_sep = ""
let g:airline_section_b = ""
let g:airline_section_x = ""
let g:airline_section_y = ""
" ctrl-p
NeoBundle "kien/ctrlp.vim"
let g:ctrlp_mruf_max = 250
let g:ctrlp_use_caching = 1
let g:ctrlp_clear_cache_on_exit = 0
" NerdTree
NeoBundle "scrooloose/nerdtree"
map <Leader>k :NERDTreeToggle<CR>
autocmd vimenter * if !argc() | NERDTree | endif
autocmd BufEnter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary")
" Syntastic
NeoBundle "scrooloose/syntastic"
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_enable_signs = 1
let g:syntastic_auto_loc_list = 2
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_no_include_search = 0
let g:syntastic_javascript_checkers = ["eslint"]
let g:syntastic_coffeescript_checkers = ["coffeelint"]
let g:syntastic_cpp_compiler = "g++"
" let g:syntastic_cpp_compiler_options = " -std=c++11"
let g:syntastic_java_checkers = []
let g:syntastic_error_symbol = "X"
let g:syntastic_style_error_symbol = ">"
let g:syntastic_warning_symbol = "!"
let g:syntastic_style_warning_symbol = ">"
" autocomplete
NeoBundle "Shougo/neocomplcache"
let g:acp_enableAtStartup = 0
let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_enable_smart_case = 1
let g:neocomplcache_min_syntax_length = 2
let g:neocomplcache_enable_auto_select = 1
let g:neocomplcache_max_list = 12
let g:neocomplcache_enable_camel_case_completion = 1
let g:neocomplcache_enable_underbar_completion = 1
" finish up Neobundle
call neobundle#end()
filetype plugin indent on
NeoBundleCheck
" that colorscheme (has to be down here for some reason)
try
colorscheme iceberg
catch
colorscheme darkblue
endtry
" ~/.vimrc_local if you have it
if filereadable(expand("~/.vimrc_local"))
source ~/.vimrc_local
endif