From: Simon Ruderich Date: Tue, 23 Nov 2010 23:24:59 +0000 (+0100) Subject: vimrc: Behave like 'scrolloff' while searching. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=63c87697a4eafe134ae1196021afd8441c6b4e33;p=config%2Fdotfiles.git vimrc: Behave like 'scrolloff' while searching. --- diff --git a/vimrc b/vimrc index 582797e..7d1f0ae 100644 --- a/vimrc +++ b/vimrc @@ -214,6 +214,11 @@ cnoremap nnoremap nnoremap - +" Behave like 'scrolloff' but only while searching. Thanks to "Benjamin R. +" Haskell" from the Vim mailing list (2010-10-26). +nnoremap n nzv3j3k +nnoremap N Nzv3k3j + " Go to next and previous buffer. Thanks to elik in #vim on Freenode " (2010-05-16 18:38 CEST) for this idea. nnoremap gb :bnext