I was looking at my vimrc recently, and I was wondering which mappings I really use. So, I thought that a "mapcop" type plugin would be very useful, but that would require getting a list of all mappings defined in a certain file. I know that you can get where a mapping was defined by doing :verbose {map_type}map {mapping}
, but that won't really cut it for what I want to use it for.
these commands could show {map_type}map {mapping}
created in certain file:
:redir @x
:verbose map
:redir END
:%d|pu x
:g/filename$/-1 y M
:%d|pu m
filename
you have to do escaping, like \\~\\/[.]vimrc$
for ~/.vimrc
filename
will be put in current buffer (the original text in buffer will be cleared) verbose map
output 使用标签栏插件,您可以查看vimscript文件中定义的所有映射,包括.vimrc
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.