changeset 367:d8ae3de7de06

More Vim tweaks.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 16 Feb 2017 18:48:31 -0800
parents 13e897e6a813
children 12a3a0e31f8e
files vim/vimrc
diffstat 1 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 <home> g<home>
 noremap <end> g<end>
 
+noremap <S-up> 20<up>
+noremap <S-down> 20<down>
+
 " Tab navigation
 noremap <C-Tab>   :tabnext<cr>
 noremap <C-S-Tab> :tabprevious<cr>
@@ -495,11 +505,15 @@
 nnoremap [l :lprevious<cr>zvzz
 
 " Same with change and jump lists.
-nnoremap ]] g,zz
-nnoremap [[ g;zz
+nnoremap ]e g,zz
+nnoremap [e g;zz
 nnoremap ]j <C-I>
 nnoremap [j <C-O>
 
+" Copy the current buffer's info.
+nnoremap <leader>cp :let @+ = expand('%:p')<cr>
+nnoremap <leader>cf :let @+ = expand('%:h')<cr>
+
 " 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 <F9> :pop<cr>
-nnoremap <F10> <c-]>zvzz
-nnoremap <s-F10> <c-w>v<c-]>zMzvzz
+nnoremap <F10> :tj<cr>zvzz
+nnoremap <s-F10> <c-w>v:tj<cr>zMzvzz
 nnoremap <c-F9> :tprevious
 nnoremap <c-F10> :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