Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Macros</strong></p> <p>What is mostly called a macro in vim is initiated with <kbd>@</kbd> and a letter. It executes the contents of a register with the said letter as its name. </p> <p><strong>List the register contents</strong></p> <p><code>:reg</code></p> <p>You can clear the register a with</p> <p><code>:let @a = ''</code> <hr/> Sometimes mappings or abbreviations are confused for macros, therefore here is some information about them.</p> <p><strong>List mappings</strong></p> <p>all mappings</p> <p><code>:map</code></p> <p>all mappings that start with \</p> <p><code>:map \</code></p> <p>normal mode</p> <p><code>:nmap</code></p> <p>insert mode</p> <p><code>:imap</code></p> <p>visual mode</p> <p><code>:vmap</code></p> <p>command mode</p> <p><code>:cmap</code></p> <p><strong>List abbreviations</strong></p> <p>all abbreviations</p> <p><code>:abbr</code></p> <p>all abbreviations starting with email</p> <p><code>:abbr email</code></p> <p>insert mode</p> <p><code>:iabbr</code></p> <p>command mode</p> <p><code>:cabbr</code></p> <p>You can use <code>:verbose</code> before the previous commands to get more info about where the mapping/abbreviation was last set, as in <code>:verbose nmap</code>. These commands also show all the mappings that have been set by plugins and other configuration files.</p> <p><strong>Removing a mapping/abbreviation</strong> </p> <p>(only a couple of modes listed here, you should be able to remove one just for a certain mode just like with the listing commands above.)</p> <p>insert mode, remove a mapping that is defined as \:</p> <p><code>:iunmap \\</code></p> <p>normal mode:</p> <p><code>:nunmap \\</code></p> <p>remove an abbreviation defined as email:</p> <p><code>:unabbr email</code></p> <p>insert mode:</p> <p><code>:iunabbr email</code></p> <p><strong>Clear mappings/abbreviations</strong></p> <p>I wouldn't recommend clearing all mappings/abbreviations since you would lose everything your plugins have mapped/abbreviated. However, you can clear mappings by putting the letter <kbd>c</kbd> after the above listing command, as in <code>:imapc</code> to clear insert mode mappings. Abbreviations can be cleared with <code>:abclear</code>, or just for insert mode <code>:iabclear</code> and just for command mode <code>:cabclear</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload