![](/img/trans.png)
[英]Can I remap the “,” command in VIM before using it as the leader key?
[英]How do I take input into variable , from leader key, and execute into a command in vim?
我想要的结果是通过leader key+t+word找到标签。
noremap <leader>t :call someFunc(mystring-after-t)<cr>
function getTag(string)
execute "normal! :tag " . string "\<cr>"
endfunction
我不知道是否有一种方法可以告诉映射接受一些用户输入。 但是您可以按以下方式实现这一点(为了方便起见,我冒昧地简化了手头的任务......)
function EchoWord(x)
redraw
echom 'I got the input: ' . a:x
endfunction
noremap <leader>l :call EchoWord(input(""))<cr>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.