是否有一种命令可以将键位映射重置为其默认值?
对于所有键位,而不仅仅是单个键。
或者也许有一个插件可以实现这个功能?
您可以通过运行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>