key-mapping abbreviations user-commands
INTRO TO BE WRITTEN…
Key mapping | macro mapping key-mapping |
<Nop>
Do nothing. This command is useful for disabling a specific mapping. :map <C-n> <Nop> will prevent <C-n> from doing anything.
:map
Map the key sequence {lhs} to {rhs}. The {rhs} is remapped, allowing for nested and recursive mappings. Mappings are NOT saved during sessions, make sure you put them in your vimperatorrc file!
:cm :cmap
Map the key sequence {lhs} to {rhs} (in command-line mode). The {rhs} is remapped, allowing for nested and recursive mappings. Mappings are NOT saved during sessions, make sure you put them in your vimperatorrc file!
:im :imap
Map the key sequence {lhs} to {rhs} (in insert mode). The {rhs} is remapped, allowing for nested and recursive mappings. Mappings are NOT saved during sessions, make sure you put them in your vimperatorrc file!
:mapc :mapclear
Remove all mappings. All user-defined mappings which were set by :map or :noremap are cleared.
:cmapc :cmapclear
Remove all mappings (in command-line mode). All user-defined mappings which were set by :cmap or :cnoremap are cleared.
:imapc :imapclear
Remove all mappings (in insert mode). All user-defined mappings which were set by :imap or :inoremap are cleared.
:no :noremap
Map the key sequence {lhs} to {rhs}. No remapping of the {rhs} is performed.
:cno :cnoremap
Map the key sequence {lhs} to {rhs} (in command-line mode). No remapping of the {rhs} is performed.
:ino :inoremap
Map the key sequence {lhs} to {rhs} (in insert mode). No remapping of the {rhs} is performed.
:unm :unmap
Remove the mapping of {lhs}.
:cunm :cunmap
Remove the mapping of {lhs} (in command-line mode).
:iunm :iunmap
Remove the mapping of {lhs} (in insert mode).
Abbreviations | abbreviations |
:ab :abbreviate
Abbreviate a key sequence. Abbreviate {lhs} to {rhs}. If only {lhs} given, list that particular abbreviation. List all abbreviations, if no arguments to are given.
:ca :cabbrev
Abbreviate a key sequence for Command-line mode. Same as :ab[reviate], but for command-line mode only.
:ia :iabbrev
Abbreviate a key sequence for Insert mode. Same as :ab[breviate], but for Insert mode only.
:una :unabbreviate
Remove an abbreviation.
:cuna :cunabbrev
Remove an abbreviation for Command-line mode. Same as :una[bbreviate], but for Command-line mode only.
:iuna :iunabbrev
Remove an abbreviation for Insert mode. Same as :una[bbreviate], but for Insert mode only.
:abc :abclear
Remove all abbreviations.
:cabc :cabclear
Remove all abbreviations for Command-line mode.
:iabc :iabclear
Remove all abbreviations for Insert mode.
User-defined commands | user-commands |
:com :command
List all user-defined commands.
List all user-defined commands that start with {cmd}.
Define a new user command. The name of the command is {cmd} and its relacement text is {rep}. The command's attributes are {attr}. If a command with this name already exists an error is reported unless [!] is specified, in which case the command is redefined. Unlike Vim, the command may start with a lowercase letter.
The replacement text {rep} is scanned for escape sequences and these are replaced with values from the user entered command line. The resulting string is then executed as an Ex command.
The valid escape sequences are:
<args> | The command arguments exactly as supplied |
<lt> | A literal '<' character to allow for a literal copy of one of the escape sequences. Eg. <lt>args> will expand to a literal <args> |
Note: {attr} not implemented yet.
:comc :comclear
Delete all user-defined commands.
:delc :delcommand
Delete the user-defined command {cmd}.