简体   繁体   English

在vim中显示阴影映射

[英]Show shadowed mappings in vim

I'm trying to find out if there is a way to determine if certain mappings are shadowing other mappings. 我试图找出是否有一种方法来确定某些映射是否正在遮盖其他映射。 Does anybody know if and how this is possible? 有人知道这是否可行吗?

Edit: I have a large .vimrc. 编辑:我有一个大.vimrc。 I want to know if old mappings I created when I was a (vim)beginner are shadowing native vim mappings. 我想知道我(vim)初学者时创建的旧映射是否正在遮盖本机vim映射。

Thanks 谢谢

您可能会发现:map在这里很有用。

Edit: I have a large .vimrc. 编辑:我有一个大.vimrc。 I want to know if old mappings I created when I was a (vim)beginner are shadowing native vim mappings. 我想知道我(vim)初学者时创建的旧映射是否正在遮盖本机vim映射。

the short answer, you cannot know. 简短的答案,您不知道。

One thing needs to be clarified, the " native vim mappings ". 需要澄清一件事,即“ 本地vim映射 ”。 what does it mean? 这是什么意思? I guess you mean some built-in vim commands, like dd , gg , G ... they are not mappings. 我猜你的意思是一些内置的vim命令,例如ddggG ……它们不是映射。

take the dd example, if you don't know dd exists, you create a mapping with dd to do something else, it's fine. dd为例,如果您不知道dd存在,则可以使用dd创建一个映射以执行其他操作,这很好。 and you cannot know if it will overwrite the built-in dd (delete the current line) . 并且您不知道它是否会覆盖内置的dd (delete the current line)

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

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