11.3.1 Vim hints
Read the "VIM - main help file" document by pressing <F1> while
running the program.
<F1> Help
<esc> Back to normal mode
V Visual mode
i Insert mode
: Command-line commands
:set tw=72 Set text width to 72
<F11> Insert (paste) mode
:r! date -R Insert RFC-822 date
qa Record keystrokes into register a
q Stop keystroke recording
@a Execute keystrokes from register a
:edit foo.txt Edit another file by loading foo.txt
:wnext Write current file and edit next file
q and @ can be used for simple macro recording and
playback. For instance, to create a macro that inserts HTML italics tags
around the word at the cursor, you could enter
qii<i>^[ea</i>^[q (where ^[ is the ESC
key). Then typing @i at the start of a word would add the tags
<i> and </i>.
See also
Using GnuPG with Vim, Section
14.4.2.