9
1
I want to create a mapping like the G
hotkey that jumps to a line (e.g., to jump to line 10: 10G
). How can I do that?
9
1
I want to create a mapping like the G
hotkey that jumps to a line (e.g., to jump to line 10: 10G
). How can I do that?
13
You can obtain that number from the v:count or v:count1 variable. See
:help v:count
For example,
:map G :<C-U>echo v:count<CR>
1Perfect. Got me down the right path. Needed to use
exe
though:nmap <tab> :<C-U>exe "buffer ".v:count<CR>
– Belmin Fernandez – 2012-04-10T16:45:52.020