I want to great a mapping like G hotkey that jumps to a line (e.g., to jump to line 10: 10G). How can I do that?
You can obtain that number from the v:count or v:count1 variable. See
:map G :<C-U>echo v:count<CR>
nmap <tab> :<C-U>exe "buffer ".v:count<CR>
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
2 years ago