11.8. Improved Editing Facilities
This section describes the features of vim that make simple text editing easier and more powerful.
11.8.1. Command-Line History and Completion
vim keeps a history of your ex commands, search strings, and expressions in its extended command language. These are three separate histories. The size of each is controlled by the history option; the default is 20. You may wish to increase it in your .vimrc file, although vim does take steps to maintain only unique commands.
To access the history, use the
cursor key on the colon command
line. This will move backwards through the saved commands (most recent
first). The
key will move forwards.
You can move around on the command line using the
and
keys. By default, text that you type is inserted into the
command line. You can use the INS (Insert) key
on your keyboard to toggle this mode, in which case what you
type will replace what's on the command line. The
BACKSPACE key will erase characters.
You can use the SHIFT or CTRL key in combination with the and keys to move the cursor left or right ...
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