vim:keys: Center search on <CR> too

In addition to center the cursor-line on `n` do it right after accepting
the search as well.
This commit is contained in:
2023-02-13 15:14:30 +01:00
parent 11fc486768
commit be763b9ff2

View File

@@ -262,6 +262,10 @@ vnoremap = =gv
" Center search results
noremap n nzz
cnoremap <expr> <CR> "<CR>" .
\ (getcmdtype() == '/' \|\| getcmdtype() == '?'
\ ? "zz"
\ : "")
" Switch to lower/upper case
nnoremap <leader><C-U> gUl