简体   繁体   English

Vim映射的含义<A-x-Left><CR>

[英]Meaning of Vim Mapping <A-x-Left><CR>

I have seen this mapping in one vimrc file 我已经在一个vimrc文件中看到了这种映射

  map <A-x-Left> :bprevious<CR>

But I don't understand how to use it. 但是我不知道如何使用它。

Me neither. 我也不。 Vim doesn't support key chording, only simple combinations of Ctrl or Alt with another (possibly Shift -ed) key. Vim不支持键和弦,仅支持CtrlAlt与另一个(可能是Shift -ed)键的简单组合。 :help key-notation is the corresponding reference. :help key-notation是相应的参考。

What was probably meant is this: 这可能是什么意思:

map <A-x><Left> :bprevious<CR>

Which can be triggered by first pressing Alt + X together, followed by . 可以通过先同时按下Alt + X来触发。

And this should use :noremap ; 应该使用:noremap ; it makes the mapping immune to remapping and recursion. 它使映射不受重新映射和递归的影响。

<A- is the Alt key, so <Ax-Left> means Alt + x + left arrow. <A-是Alt键,因此<Ax-Left>表示Alt + x +向左箭头。 You can read more on key notation in vim's help: :help key-notation . 您可以在vim的帮助中了解更多关于键符号的信息:help key-notation

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM