# HG changeset patch # User Ludovic Chabant # Date 1409527837 25200 # Node ID dae926f52b9a1bd67877d81eb097377c0226c514 # Parent 9ecffad709b3a90cf997180a7821e8f6985d3c9f Some Vim tweaks. diff -r 9ecffad709b3 -r dae926f52b9a vim/vimrc --- a/vim/vimrc Sun Aug 31 16:29:35 2014 -0700 +++ b/vim/vimrc Sun Aug 31 16:30:37 2014 -0700 @@ -239,13 +239,19 @@ " }}} +" Autotags {{{ + +let g:autotags_exclude = ['venv', 'build', 'static', 'node_modules'] + +" }}} + " Syntastic {{{ " Use `pyflakes` with `syntastic`. -let g:syntastic_python_checkers = ['pyflakes'] -let g:syntastic_mode_map = { - \'mode': 'active', - \'passive_filetypes': []} +"let g:syntastic_python_checkers = ['pyflakes'] +"let g:syntastic_mode_map = { +" \'mode': 'active', +" \'passive_filetypes': []} " }}} @@ -257,7 +263,7 @@ \} " Make the annotate window better in Lawrencium. -let g:lawrencium_annotate_width_offset = 0 +let g:lawrencium_annotate_width_offset = 1 " }}} @@ -379,7 +385,6 @@ " Ctrl-P mappings. nnoremap :CtrlP nnoremap :CtrlPBuffer -nnoremap :CtrlPBufTag nnoremap :CtrlPTag nnoremap :CtrlPQuickfix nnoremap :CtrlPMRUFiles @@ -417,6 +422,25 @@ vnoremap * :call VSetSearch()// vnoremap # :call VSetSearch()?? +" Jump to tags by keeping things better in view. Option for jumping to a tag +" in a split window where everything is folded except what you need to see. +function! JumpToTag() + execute "normal! \zz" +endfunction +function! JumpToTagInSplit() + execute "normal! \v\zMzvzz" +endfunction +nnoremap :silent! call JumpToTag() +nnoremap :silent! call JumpToTagInSplit() + +" Keep search matches in the middle of the window. +nnoremap n nzzzv +nnoremap N Nzzzv + +" Same when jumping around +nnoremap g; g;zz +nnoremap g, g,zz + " }}} " Abbreviations {{{