I would like Vim to place my cursor in the middle of screen after search. I have achieved for *
, #
, n
and N
commands with the following lines in .vimrc
nmap * *zz
nmap # #zz
nmap n nzz
nmap N Nzz
My question is: how to map /
and ?
the same way? I.e. I would like to position cursor after some text has been found using
/some-text-to-find-forward
?some-text-to-find-backward