-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
303 lines (262 loc) · 8.31 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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
" Vundle stuff
set nocompatible " be iMproved
"filetype off " required!
filetype on
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
"Bundle 'edkolev/tmuxline.vim' DISABLED from LAST
Bundle "def-lkb/ocp-indent-vim"
autocmd FileType ocaml exec ":source " . g:opamshare . "/ocp-indent/vim/indent/ocaml.vim"
" File Navigation
Bundle 'kien/ctrlp.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'vim-quicktask'
" Editing
Plugin 'itchyny/calendar.vim'
Bundle 'Align'
"Bundle 'kana/vim-smartinput'
Bundle 'scrooloose/syntastic'
Bundle 'tpope/vim-commentary'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-repeat'
Bundle 'tpope/vim-surround'
Plugin 'godlygeek/tabular'
Plugin 'gundo'
Plugin 'vim-scripts/a.vim'
Bundle 'justinmk/vim-sneak'
Plugin 'airblade/vim-gitgutter'
Plugin 'thinca/vim-quickrun'
Plugin 'bronson/vim-trailing-whitespace'
Plugin 'tyru/open-browser.vim'
Plugin 'lervag/vimtex'
" File Specific
Bundle 'digitaltoad/vim-jade'
Bundle 'gregsexton/MatchTag'
Bundle 'juvenn/mustache.vim'
Bundle 'kana/vim-textobj-user'
Bundle 'nelstrom/vim-textobj-rubyblock'
Bundle 'puppetlabs/puppet-syntax-vim'
Bundle 'skalnik/vim-vroom'
Bundle 'sudar/vim-arduino-syntax'
Bundle 'tpope/vim-markdown'
Bundle 'tpope/vim-rails'
Bundle 'ap/vim-css-color'
Bundle 'hail2u/vim-css3-syntax'
Bundle 'tpope/vim-haml'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'pangloss/vim-javascript'
Plugin 'elzr/vim-json'
Plugin 'majutsushi/tagbar'
Plugin 'groenewege/vim-less'
Bundle "marijnh/tern_for_vim"
Plugin 'kchmck/vim-coffee-script'
Plugin 'vim-ruby/vim-ruby'
Plugin 'othree/html5.vim'
Plugin 'klen/python-mode'
" Looks
Plugin 'morhetz/gruvbox'
Bundle 'nathanaelkane/vim-indent-guides'
Bundle 'skalnik/vim-irblack'
"Bundle 'Lokaltog/vim-powerline'
"Bundle 'altercation/vim-colors-solarize'
Plugin 'bling/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
"Plugin 'tomasr/molokai'
" Misc
Bundle 'scratch.vim'
Bundle 'matthias-guenther/hammer.vim'
Bundle 'delimitMate.vim'
Bundle 'matchit.zip'
Bundle 'Vimball'
Bundle 'ScrollColors'
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'tComment'
Bundle 'mru.vim'
Plugin 'scrooloose/nerdcommenter'
Plugin 'rizzatti/dash.vim'
Plugin 'tomtom/tcomment_vim'
Plugin 'tpope/vim-obsession'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'tpope/vim-fugitive'
Plugin 'tmux-plugins/vim-tmux'
Plugin 'tmux-plugins/vim-tmux-focus-events'
Plugin 'gmarik/Vundle.vim'
Plugin 'carlobaldassi/ConqueTerm'
Plugin 'fholgado/minibufexpl.vim'
Plugin 'tpope/vim-sensible'
"Plugin 'Valloric/YouCompleteMe'
Plugin 'mileszs/ack.vim'
Plugin 'christoomey/vim-tmux-navigator'
" Track the engine.
Plugin 'SirVer/ultisnips'
Bundle 'ervandew/supertab'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
call vundle#end()
filetype plugin indent on " required!
" End Vundle Stuff
"source $HOME/.local/lib/python2.7/site-packages/powerline/bindings/vim/plugin/powerline.vim
"set laststatus=2
" set colors
"set t_Co=256
let g:ackprg = 'ag --nogroup --nocolor --column'
" google calendar stuff
let g:calendar_google_calendar = 1
let g:calendar_google_task = 1
" airline settings
let g:airline#extensions#tabline#enabled = 1
let g:airline_section=''
let g:airline_detect_paste=1 " Show PASTE if in paste mode
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
" airline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
"enable powerline from here down. Not source above.
"set rtp+=/usr/lib/python3.5/site-packages/powerline/bindings/vim/
"set laststatus=2
"Ocaml import
let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
execute "set rtp+=" . g:opamshare . "/merlin/vim"
let g:syntastic_ocaml_checkers = ['merlin']
"Ocaml import end
" Ag with Ack.vim search
let g:ackprg = 'ag --nogroup --nocolor --column'
" minibufexpl stuff
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
"Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" Easy navigation
nnoremap <C-J> <C-W><C-J>
nnoremap <C-H> <C-W><C-H>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
let python_highlight_all = 1
set cursorline
set number
set magic
set autoindent
set showmatch
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=8
set clipboard=unnamedplus
syntax on
"colorscheme slate
"let g:gruvbox_contrast_dark='hard'
colorscheme gruvbox
syntax enable
set background=dark
"colorscheme solarized
"let g:solarized_termcolors=256
autocmd Filetype c setlocal noexpandtab softtabstop=8 shiftwidth=8
let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"
nnoremap <F5> :GundoToggle<CR>
"OCAML STUFF
au BufEnter *.ml setf ocaml
au BufEnter *.mli setf ocaml
au FileType ocaml call FT_ocaml()
function FT_ocaml()
set textwidth=80
set colorcolumn=80
set shiftwidth=2
set tabstop=2
" ocp-indent with ocp-indent-vim
let opamshare=system("opam config var share | tr -d '\n'")
execute "autocmd FileType ocaml source".opamshare."/ocp-indent/vim/indent/ocaml.vim"
filetype indent on
filetype plugin indent on
endfunction
" Compatible with ranger 1.4.2 through 1.7.*
"
" Add ranger as a file chooser in vim
"
" If you add this code to the .vimrc, ranger can be started using the command
" ":RangerChooser" or the keybinding "<leader>r". Once you select one or more
" files, press enter and ranger will quit again and vim will open the selected
" files.
let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
execute "set rtp+=" . g:opamshare . "/merlin/vim"
function! RangeChooser()
let temp = tempname()
" The option "--choosefiles" was added in ranger 1.5.1. Use the next line
" with ranger 1.4.2 through 1.5.0 instead.
"exec 'silent !ranger --choosefile=' . shellescape(temp)
if has("gui_running")
exec 'silent !xterm -e ranger --choosefiles=' . shellescape(temp)
else
exec 'silent !ranger --choosefiles=' . shellescape(temp)
endif
if !filereadable(temp)
redraw!
" Nothing to read.
return
endif
let names = readfile(temp)
if empty(names)
redraw!
" Nothing to open.
return
endif
" Edit the first item.
exec 'edit ' . fnameescape(names[0])
" Add any remaning items to the arg list/buffer list.
for name in names[1:]
exec 'argadd ' . fnameescape(name)
endfor
redraw!
endfunction
command! -bar RangerChooser call RangeChooser()
nnoremap <leader>r :<C-U>RangerChooser<CR>
"TURN OFF PARENTHESIS MATCHING
let loaded_delimitMate = 0
"TURN OFF PYTHON FOLDING
let g:pymode_folding = 0
"ENABLE MOUSE
set mouse=a
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on
" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash
" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*
" OPTIONAL: This enables automatic indentation as you type.
filetype indent on
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'