Auto 'zz' in vim after the jump

After I jump to anywhere in the world, whether in the current file or in another file, is it possible to automatically launch vim zz (re-center the current line)?

I want this after things like search, ctrl-o and ctrl-i ... and almost any movement other than hjkl .

Thanks.

+4
source share
1 answer

Voila:

 " Center screen on next/previous selection. nnoremap n nzz nnoremap N Nzz " Last and next jump should center too. nnoremap <Co> <Co>zz nnoremap <Ci> <Ci>zz 
+9
source

Source: https://habr.com/ru/post/1303006/


All Articles