是否有一个命令可以将键映射重置为默认值?
所有,而不仅仅是一个键。
或插件可能?
答案 0 :(得分:14)
您可以通过运行某些mapclear
系列命令来删除某些模式的所有映射。
这取自:h mapclear
:mapc[lear] mapmode-nvo :mapc :mapclear
:nmapc[lear] mapmode-n :nmapc :nmapclear
:vmapc[lear] mapmode-v :vmapc :vmapclear
:xmapc[lear] mapmode-x :xmapc :xmapclear
:smapc[lear] mapmode-s :smapc :smapclear
:omapc[lear] mapmode-o :omapc :omapclear
:mapc[lear]! mapmode-ic :mapc! :mapclear!
:imapc[lear] mapmode-i :imapc :imapclear
:lmapc[lear] mapmode-l :lmapc :lmapclear
:cmapc[lear] mapmode-c :cmapc :cmapclear
Remove ALL mappings for the modes where the map
command applies. {not in Vi}
Use the <buffer> argument to remove buffer-local
mappings :map-<buffer>
Warning: This also removes the default mappings.
删除所有内容的一个命令是
:mapclear | mapclear <buffer> | mapclear! | mapclear! <buffer>