
new | 745
vi
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
map
map[!] [string commands]
Define a keyboard macro named string as the specified sequence of
commands. string is usually a single character, or the sequence
#num, representing a function key on the keyboard. Use a ! to
create a macro for input mode. With no arguments, list the
currently defined macros.
Examples
:map K dwwP Transpose two words
:map q :w^M:n^M Write current file; go to next
:map! + ^[bi(^[ea) Enclose previous word in parentheses
vim has K and q commands, which the above aliases
would hide.
mark
[address] ma char
Mark the specified line with char, a single lowercase letter. Return
later to the line with 'x (where x is the same as char). vim also uses
uppercase and numeric characters for marks. Lowercase letters
work the same as in vi. Uppercase letters are associated with file-
names and can be used between multiple files. Numbered marks,
however, are maintained in a special viminfo file and cannot be set
using this command. Same as k.
marks
marks [chars]
Print list of marks specified by chars, or all current marks if no
chars specified. {vim}
Example
:marks abc Print marks a, b and c.
mkexrc
mk[!] file
Create an .exrc file containing set commands for changed ex
options and key mappings. This saves the current option settings,
allowing you to restore them later.
move
[address ...