How do i remap G
to do what G
and zz
do simultaneously ? In other words, I would like to move to the bottom of the page and then have the text moved to the middle of the screen.
I tried something like :
nnoremap G :norm Gzz<CR>
But Im getting the error : command too recursive
:norm!
to make it non-recursive. See:help :norm
for more details. You can also just simply usennoremap G Gzz
, no? – filbranden♦ Oct 6 '20 at 14:59nnoremap
(andnmap
) are for specifying Normal mode key maps. That means they accept Normal mode commands without having to use:norm[!]
. – B Layer Oct 6 '20 at 15:01