[英]Vim key mapping how to map <leader> + key press together?
Currently I have this mapping: 目前我有这个映射:
noremap <leader>[ gT
Everytime I need to press leader
, keyup, then [ to go to previous tab, is it possible to map it similar to Ctrl ones like C - [ so I don't have to keyup <leader>
for keep going previous tabs? 每次我需要按
leader
,键盘,然后[转到上一个选项卡,是否可以将它映射为类似于Ctrl的那些像C - [所以我没有键盘 <leader>
来继续前面的标签?
I tried <leader-[>
and it didn't work 我试过
<leader-[>
但它没有用
Vanilla vim doesn't support mappings for simultaneous input. Vanilla vim不支持同时输入的映射。 But, I found this script on the vim website.
但是,我在vim网站上找到了这个脚本。
http://www.vim.org/scripts/script.php?script_id=2425 http://www.vim.org/scripts/script.php?script_id=2425
It's called Arpeggio. 它被称为琶音。 Usage is exactly as you'd expect, so for your case:
用法完全符合您的预期,因此对于您的情况:
:Arpeggio noremap <Leader>[ gT
It looks like there's some caveats w/r/t multiple mappings with the same keys; 看起来有一些警告w / r / t具有相同键的多个映射; not familiar enough with the script to say much though.
虽然不太熟悉剧本。 Reading through their documentation would be a good place to start.
阅读他们的文档将是一个很好的起点。
Hope that helps! 希望有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.