From a94999be156441410f51f49505ac5d364d65a628 Mon Sep 17 00:00:00 2001 From: Bodaniel Jeanes Date: Wed, 23 Nov 2011 16:54:11 -0600 Subject: [PATCH] Center search results in vim --- editors/vim/ui.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/editors/vim/ui.vim b/editors/vim/ui.vim index 9c0db75..174c15f 100644 --- a/editors/vim/ui.vim +++ b/editors/vim/ui.vim @@ -43,7 +43,18 @@ syntax on set incsearch set ignorecase set smartcase - noremap :noh + + " Remove highlighting when entering insert (not working... ) + autocmd InsertEnter * nohlsearch + + " center result + nnoremap n nzz + nnoremap N Nzz + nnoremap * *zz + nnoremap # #zz + nnoremap g* g*zz + nnoremap g# g#zz + " Tab completion set wildmode=list:longest,list:full