如何在Vim中找出由某些快捷方式触发的命令 [英] How to find out in Vim which command is triggered by some shortcut

查看:71
本文介绍了如何在Vim中找出由某些快捷方式触发的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过按下键盘的快捷键 F2 在某些插件中执行命令.但是,执行了其他一些命令.但是该命令给出了一个错误.因此,尚不清楚该干扰命令的键映射在何处定义.我想更改该快捷方式的映射.为此,我需要找出该干扰命令是什么.

I try to execute a command in some plugin by pushing it's keyboard shortcut F2. But some other command is executed, instead. But that command gives an error. So it is not clear where the key mapping of that interfering command is defined. I want to change the mapping of that shortcut. To do this I need to find out what that interfering command is.

有没有办法找出某个键盘快捷键触发了哪个命令?

Is there a way to find out which command is triggered by some keyboard shortcut?

推荐答案

verbose map <F2>

将为您提供有关{rhs}以及定义此映射的位置的信息.对于插入模式映射,将map替换为imap,与其他映射模式相同.

will give you information about both {rhs} and place where this mapping was defined. For insert mode mappings replace map with imap, same for other mapping modes.

这篇关于如何在Vim中找出由某些快捷方式触发的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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