]> git.rmz.io Git - dotfiles.git/commitdiff
center cursor after search
authorSamir Benmendil <samir.benmendil@gmail.com>
Sun, 27 Oct 2013 19:15:26 +0000 (20:15 +0100)
committerSamir Benmendil <samir.benmendil@gmail.com>
Sun, 27 Oct 2013 19:15:26 +0000 (20:15 +0100)
vimrc

diff --git a/vimrc b/vimrc
index 94c32a8e17e5fb81ba7ba33e16f3b1295335daa1..243745e479041713308ef938376d415224a073e7 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -18,6 +18,8 @@ set hlsearch                    " highlight all matches for the last used search
 nmap <silent> <Leader>n :silent nohl<CR>
 " use leader-# to display the number of matches for the last search
 nmap <Leader># :%s:<C-R>/::gn<CR>
 nmap <silent> <Leader>n :silent nohl<CR>
 " use leader-# to display the number of matches for the last search
 nmap <Leader># :%s:<C-R>/::gn<CR>
+" center cursor after search
+nnoremap n nzz
 
 set nostartofline       " don't  move the cursor to the first non-blank char of a line
 set path=.,**           " current + subdirectory search for :find, :grep:, ...
 
 set nostartofline       " don't  move the cursor to the first non-blank char of a line
 set path=.,**           " current + subdirectory search for :find, :grep:, ...