在 Vim 中,如何找出组合键的作用 [英] In Vim, how to find out what a key combination does

查看:24
本文介绍了在 Vim 中,如何找出组合键的作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不小心按了一个快捷键,我知道 vim 做了一些事情,但我不知道是什么.

I accidentally press a shorcut key, and I know that vim has done something but I don't know what.

我怎样才能知道那个快捷键的作用?

How can I find out what that shortcut key does?

推荐答案

有两个潜在的信息来源.首先,如果是内置快捷方式,通常在帮助文档中.例如,如果你执行 :help CTRL-I,它会带你到一个关于在你的跳转列表中移动的帮助条目.

There are two potential sources for information. First of all, if it's a built in shortcut, it is normally in the help documentation. For instance, if you do :help CTRL-I, it'll take you to a help entry about moving around your jump list.

但是,您有可能从您的 .vimrc 文件之一或文档不足的插件中获得自定义映射.在这种情况下,尝试使用 :map 它将列出当前活动的所有自定义键盘映射.这将为您提供三列:

It is possible, however, that you have a custom mapping from one of your .vimrc files or an underdocumented plugin. In that case, try using :map which will list all custom keyboard mappings that are currently active. That will give you three columns:

  1. 映射适用的模式
  2. 键盘快捷键
  3. 运行的命令

然后您可以使用 :help 进一步调查运行的命令.

You can then use :help to further investigate the command that is run.

这篇关于在 Vim 中,如何找出组合键的作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆