by pawelduda · 3y ago · 0 comments
Edit: more elegant solution https://news.ycombinator.com/item?id=34308688
" Center screen on next/previous selection.
nmap n /<CR>zz
nmap N ?<CR>zz
" Last and next jump should center too.
nnoremap <C-o> <C-o>zz
nnoremap <C-i> <C-i>zz " Center screen on next/previous selection.
nnoremap n nzz
nnoremap N Nzz
" Last and next jump should center too.
nnoremap <C-o> <C-o>zz
nnoremap <C-i> <C-i>zznnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz