# HG changeset patch # User Ludovic Chabant # Date 1487299711 28800 # Node ID d8ae3de7de069e86b29cea5cba989b26f563e042 # Parent 13e897e6a813cf0458b15268cd451066ab49608d More Vim tweaks. diff -r 13e897e6a813 -r d8ae3de7de06 vim/vimrc --- a/vim/vimrc Thu Feb 16 18:46:50 2017 -0800 +++ b/vim/vimrc Thu Feb 16 18:48:31 2017 -0800 @@ -266,6 +266,13 @@ \'autoignore' \] +" Use PyMatch to go faster. +if has('python') || has('python3') + let g:ctrlp_match_func = {'match': 'pymatcher#PyMatch'} + let g:ctrlp_max_files = 0 + let g:ctrlp_lazy_update = 350 +endif + " }}} " Gutentags {{{ @@ -414,6 +421,9 @@ noremap g noremap g +noremap 20 +noremap 20 + " Tab navigation noremap :tabnext noremap :tabprevious @@ -495,11 +505,15 @@ nnoremap [l :lpreviouszvzz " Same with change and jump lists. -nnoremap ]] g,zz -nnoremap [[ g;zz +nnoremap ]e g,zz +nnoremap [e g;zz nnoremap ]j nnoremap [j +" Copy the current buffer's info. +nnoremap cp :let @+ = expand('%:p') +nnoremap cf :let @+ = expand('%:h') + " Make the diff navigation also center things. nnoremap ]c ]czvzz nnoremap [c [czvzz @@ -523,8 +537,8 @@ " some of that `zvzz` stuff, but that's OK, the main point is to not mess up " the result selection window either. nnoremap :pop -nnoremap zvzz -nnoremap vzMzvzz +nnoremap :tjzvzz +nnoremap v:tjzMzvzz nnoremap :tprevious nnoremap :tnext @@ -536,6 +550,9 @@ " Folding {{{ +" Start with one level of open. +set foldlevel=1 + " Folds are defined by markers in the text. set foldmethod=marker