Macros
|
Command |
Action |
|
:ab |
Use |
|
:unab |
Remove abbreviation for |
|
:ab |
List abbreviations. |
|
:map |
Map character |
|
:unmap |
Disable map for character |
|
:map |
List characters that are mapped. |
|
:map! |
Map character |
|
:unmap! |
Disable input mode map (you may need to quote the character with Ctrl-V). |
|
:map! |
List characters that are mapped to input mode. |
|
q |
Record typed characters into register specified by letter |
|
q |
Stop recording. (vim) |
|
@x |
Execute the register specified by letter x. (vim) |
In vi, the following characters are unused in command mode and can be mapped as user-defined commands:
- Letters
g K q V v- Control keys
^K ^O ^T ^W ^X- Symbols
_ * \ =
Tip
The = is used by vi if LISP mode is set. vim uses all of these characters, but you can create macros for function keys and multiple character commands. See :help :map for details. Other versions of vi may use some of these characters as well, so test them before using them.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access