Resetting all key maps in Vim

Is there a command that resets key mappings to their default values?

For all of them, not just for one key.

or a plugin maybe?

Answers


You can remove all mappings for certain modes by running some of the mapclear family of commands.

This is taken from :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.

One command to remove everything is

:mapclear | mapclear <buffer> | mapclear! | mapclear! <buffer>

Need Your Help

Java make class available from JAR

java jar

I am making a program that operates as multiple JAR file dependencies. Basically, the thing loops through the .class files in a JAR file and gets a Class object for each of them. Each JAR has a Plu...

getOAuthRequestToken returns null while using twitter4j

java android twitter twitter-oauth twitter4j

I am using twitter4j for authorization purpose for my android application.