Next: , Previous: File and Buffer Handling, Up: Commands

4.5 Mapping

:map <string>
Start defining a Vi-style keyboard macro. For instance, typing :map www followed by :!wc % and then typing C-x ) will cause www to run wc on current file (Vi replaces ‘%’ with the current file name).
C-x )
Finish defining a keyboard macro. In Viper, this command completes the process of defining all keyboard macros, whether they are Emacs-style or Vi-style. This is a departure from Vi, needed to allow WYSIWYG mapping of keyboard macros and to permit the use of function keys and arbitrary Emacs functions in the macros.
:unmap <string>
Deprive <string> of its mappings in Vi state.
:map! <string>
Map a macro for Insert state.
:unmap! <string>
Deprive <string> of its mapping in Insert state (see :unmap).
@<a-z>
In Vi state, execute the contents of register as a command.
@@
In Vi state, repeat last register command.
@#
In Vi state, begin keyboard macro. End with @<a-z>. This will put the macro in the proper register. Register will be automatically down-cased. See Macros and Registers, for more info.
@!<a-z>
In Vi state, yank anonymous macro to register
*
In Vi state, execute anonymous macro (defined by C-x( and C-x )).
C-x e
Like *, but works in all Viper states.
#g<move>
Execute the last keyboard macro for each line in the region. See Macros and Registers, for more info.
[<a-z>
Show contents of textmarker.
]<a-z>
Show contents of register.