comparison vim/vimrc @ 206:dae926f52b9a

Some Vim tweaks.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 31 Aug 2014 16:30:37 -0700
parents 0db3b41793ee
children d482e6144d52
comparison
equal deleted inserted replaced
205:9ecffad709b3 206:dae926f52b9a
237 " Initialize other custom extensions. 237 " Initialize other custom extensions.
238 call ctrlpext#autoignore#init() 238 call ctrlpext#autoignore#init()
239 239
240 " }}} 240 " }}}
241 241
242 " Autotags {{{
243
244 let g:autotags_exclude = ['venv', 'build', 'static', 'node_modules']
245
246 " }}}
247
242 " Syntastic {{{ 248 " Syntastic {{{
243 249
244 " Use `pyflakes` with `syntastic`. 250 " Use `pyflakes` with `syntastic`.
245 let g:syntastic_python_checkers = ['pyflakes'] 251 "let g:syntastic_python_checkers = ['pyflakes']
246 let g:syntastic_mode_map = { 252 "let g:syntastic_mode_map = {
247 \'mode': 'active', 253 " \'mode': 'active',
248 \'passive_filetypes': []} 254 " \'passive_filetypes': []}
249 255
250 " }}} 256 " }}}
251 257
252 " Lawrencium {{{ 258 " Lawrencium {{{
253 259
255 let g:lawrencium_hg_commands_file_types = { 261 let g:lawrencium_hg_commands_file_types = {
256 \'clog': 'hggraphlog' 262 \'clog': 'hggraphlog'
257 \} 263 \}
258 264
259 " Make the annotate window better in Lawrencium. 265 " Make the annotate window better in Lawrencium.
260 let g:lawrencium_annotate_width_offset = 0 266 let g:lawrencium_annotate_width_offset = 1
261 267
262 " }}} 268 " }}}
263 269
264 " Gundo {{{ 270 " Gundo {{{
265 271
377 nnoremap <leader><space> :noh<cr>:call clearmatches()<cr> 383 nnoremap <leader><space> :noh<cr>:call clearmatches()<cr>
378 384
379 " Ctrl-P mappings. 385 " Ctrl-P mappings.
380 nnoremap <silent> <C-p> :CtrlP<cr> 386 nnoremap <silent> <C-p> :CtrlP<cr>
381 nnoremap <silent> <C-o> :CtrlPBuffer<cr> 387 nnoremap <silent> <C-o> :CtrlPBuffer<cr>
382 nnoremap <silent> <C-i> :CtrlPBufTag<cr>
383 nnoremap <silent> <C-u> :CtrlPTag<cr> 388 nnoremap <silent> <C-u> :CtrlPTag<cr>
384 nnoremap <silent> <C-y> :CtrlPQuickfix<cr> 389 nnoremap <silent> <C-y> :CtrlPQuickfix<cr>
385 nnoremap <silent> <Tab> :CtrlPMRUFiles<cr> 390 nnoremap <silent> <Tab> :CtrlPMRUFiles<cr>
386 391
387 " Switch between FR and US keyboard layouts. 392 " Switch between FR and US keyboard layouts.
414 let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g') 419 let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g')
415 let @@ = temp 420 let @@ = temp
416 endfunction 421 endfunction
417 vnoremap * :<C-u>call <SID>VSetSearch()<CR>//<CR><c-o> 422 vnoremap * :<C-u>call <SID>VSetSearch()<CR>//<CR><c-o>
418 vnoremap # :<C-u>call <SID>VSetSearch()<CR>??<CR><c-o> 423 vnoremap # :<C-u>call <SID>VSetSearch()<CR>??<CR><c-o>
424
425 " Jump to tags by keeping things better in view. Option for jumping to a tag
426 " in a split window where everything is folded except what you need to see.
427 function! JumpToTag()
428 execute "normal! \<c-]>zz"
429 endfunction
430 function! JumpToTagInSplit()
431 execute "normal! \<c-w>v\<c-]>zMzvzz"
432 endfunction
433 nnoremap <c-]> :silent! call JumpToTag()<cr>
434 nnoremap <c-\> :silent! call JumpToTagInSplit()<cr>
435
436 " Keep search matches in the middle of the window.
437 nnoremap n nzzzv
438 nnoremap N Nzzzv
439
440 " Same when jumping around
441 nnoremap g; g;zz
442 nnoremap g, g,zz
419 443
420 " }}} 444 " }}}
421 445
422 " Abbreviations {{{ 446 " Abbreviations {{{
423 447