Method
is enabled.
These language mappings are normally used to type characters
that are different from what the keyboard produces. The
'keymap' option can be used to install a whole number of them.
When entering a command line, langmap mappings are switched
off, since you are expected to type a command. After
switching it on with CTRL-^, the new state is not used again
for the next command or Search pattern.
*c_CTRL-]*
CTRL-] Trigger abbreviation, without inserting a character.
For Emacs-style editing on the command-line see |emacs-keys|.
The <Up> and <Down> keys take the current command-line as a search string.
The beginning of the next/previous command-lines are compared with this
string. The first line that matches is the new command-line. When typing
these two keys repeatedly, the same string is used again. For example, this
can be used to find the previous substitute command: Type ":s" and then <Up>.
The same could be done by typing <S-Up> a number of times until the desired
command-line is shown. (Note: the shifted arrow keys do not work on all
terminals)
*:his* *:history*
:his[tory] Print the history of last entered commands.
:his[tory] [{name}] [{first}][, [{last}]]
List the contents of history {name} which can be:
c[md] or : command-line history
s[earch] or / or ? search string history
e[xpr] or = expression register history
i[nput] or @ input line history
d[ebug] or > debug command history
a[ll] all of the above
If the numbers {first} and/or {last} are given, the respective
range of entries from a history is listed. These numbers can
be specified in the following form:
*:history-indexing*
A positive number represents the absolute index of an entry
as it is given in the first column of a :history listing.
This number remains fixed even if other entries are deleted.
(see |E1510|)
A negative number means the relative position of an entry,
counted from the newest entry (which has index -1) backwards.
Examples:
List entries 6 to 12 from the search history: >
:history / 6,12
<
List the penultimate entry from all histories: >
:history all -2
<
List the most recent two entries from all histories: >
:history all -2,
:keepp[atterns] {command} *:keepp* *:keeppatterns*
Execute {command}, without adding anything to the search
history and, in case of |:s| or |:&|, without modifying the
last substitute pattern or substitute string.
==============================================================================
2. Command-line completion *cmdline-completion*
When editing the command-line, a few commands can be used to complete the
word before the cursor. This is available for:
- Command names: At the start of the command-line.
- |++opt| values.
- Tags: Only after the ":tag" command.
- File names: Only after a command that accepts a file name or a setting for
an option that can be set to a file name. This is called file name
completion.
- Shell command names: After ":!cmd", ":r !cmd" and ":w !cmd". $PATH is used.
- Options: Only after the ":set" command.
- Mappings: Only after a ":map" or similar command.
- Variable and function names: Only after a ":if", ":call" or similar command.
The number of help item matches is limited (currently to 300) to avoid a long
delay when there are very many matches.
These are the commands that can be used:
*c_CTRL-D*
CTRL-D List names that match the pattern in front of the cursor.
When showing file names, directories are highlighted (see
|highlight-groups|). Names where 'suffixes' matches are moved
to the end.
The 'wildoptions' option can be set to "tagfile" to list the
file of matching tags.
*c_CTRL-I* *c_wildchar* *c_<Tab>*
'wildchar' option
A match is done on the pattern in front of the cursor. The
match (if there are several, the first match) is inserted
in place of the pattern. (Note: does not work inside a
macro, because <Tab>