VIM:可映射(未使用)快捷键?

前端之家收集整理的这篇文章主要介绍了VIM:可映射(未使用)快捷键?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试创建两个对我自己有效的映射:
map X ddp

我一直用来删除和粘贴。

map X "_dw

哪个会删除一个字,而不用注册

但是我不想破坏现有的有用的快捷方式,所以我想知道我可以使用什么密钥 – 任何建议?我太厉害了吗?

vim帮助有一个部分:他映射 – 哪些键
1.7 WHAT KEYS TO MAP                                    *map-which-keys*

If you are going to map something,you will need to choose which key(s) to use
for the {lhs}.  You will have to avoid keys that are used for Vim commands,otherwise you would not be able to use those commands anymore.  Here are a few
suggestions:
- Function keys <F2>,<F3>,etc..  Also the shifted function keys <S-F1>,<S-F2>,etc.  Note that <F1> is already used for the help command.
- Meta-keys (with the ALT key pressed). |:map-alt-keys|
- Use the '_' or ',' character and then any other character.  The "_" and ","
  commands do exist in Vim (see |_| and |,|),but you probably never use them.
- Use a key that is a synonym for another command.  For example: CTRL-P and
  CTRL-N.  Use an extra character to allow more mappings.

See the file "index" for keys that are not used and thus can be mapped without
losing any builtin function.  You can also use ":help {key}^D" to find out if
a key is used for some command.  ({key} is the specific key you want to find
out about,^D is CTRL-D).

猜你在找的Bash相关文章