When entering a command line at the bottom of the screen (for
example, a filename for the :e command, or the pattern for a
search command), certain keys can be used to manipulate the
command line. Most commands have an alternate form in [ brackets
] which can be used if a key does not exist on a particular
keyboard. (Note that the forms beginning with ESC do not work in
some MS-DOS and Windows systems because ESC is the line erase
character.) Any of these special keys may be entered literally
by preceding it with the "literal" character, either ^V or ^A. A
backslash itself may also be entered literally by entering two
backslashes.
LEFTARROW [ ESC-h ]
Move the cursor one space to the left.
RIGHTARROW [ ESC-l ]
Move the cursor one space to the right.
^LEFTARROW [ ESC-b or ESC-LEFTARROW ]
(That is, CONTROL and LEFTARROW simultaneously.) Move the
cursor one word to the left.
^RIGHTARROW [ ESC-w or ESC-RIGHTARROW ]
(That is, CONTROL and RIGHTARROW simultaneously.) Move
the cursor one word to the right.
HOME [ ESC-0 ]
Move the cursor to the beginning of the line.
END [ ESC-$ ]
Move the cursor to the end of the line.
BACKSPACE
Delete the character to the left of the cursor, or cancel
the command if the command line is empty.
DELETE or [ ESC-x ]
Delete the character under the cursor.
^BACKSPACE [ ESC-BACKSPACE ]
(That is, CONTROL and BACKSPACE simultaneously.) Delete
the word to the left of the cursor.
^DELETE [ ESC-X or ESC-DELETE ]
(That is, CONTROL and DELETE simultaneously.) Delete the
word under the cursor.
UPARROW [ ESC-k ]
Retrieve the previous command line. If you first enter
some text and then press UPARROW, it will retrieve the
previous command which begins with that text.
DOWNARROW [ ESC-j ]
Retrieve the next command line. If you first enter some
text and then press DOWNARROW, it will retrieve the next
command which begins with that text.
TAB Complete the partial filename to the left of the cursor.
If it matches more than one filename, the first match is
entered into the command line. Repeated TABs will cycle
thru the other matching filenames. If the completed
filename is a directory, a "/" is appended to the
filename. (On MS-DOS systems, a "\" is appended.) The
environment variable LESSSEPARATOR can be used to specify
a different character to append to a directory name.
BACKTAB [ ESC-TAB ]
Like, TAB, but cycles in the reverse direction thru the
matching filenames.
^L Complete the partial filename to the left of the cursor.
If it matches more than one filename, all matches are
entered into the command line (if they fit).
^U (Unix and OS/2) or ESC (MS-DOS)
Delete the entire command line, or cancel the command if
the command line is empty. If you have changed your line-
kill character in Unix to something other than ^U, that
character is used instead of ^U.
^G Delete the entire command line and return to the main
prompt.