如何创建在热键之前需要数字的vim键映射(如<G>)?


Answers:


13

您可以从v:count或v:count1变量获取该数字。看到

:help v:count

例如,

:map G :<C-U>echo v:count<CR>

1
完善。带我走了正确的道路。不过需要使用exenmap <tab> :<C-U>exe "buffer ".v:count<CR>
Belmin Fernandez 2012年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.