diff options
Diffstat (limited to 'runtime/doc/cmdline.txt')
-rw-r--r-- | runtime/doc/cmdline.txt | 69 |
1 files changed, 59 insertions, 10 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index c46a9fc2d8..3f22fcb504 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -4,8 +4,8 @@ VIM REFERENCE MANUAL by Bram Moolenaar - *Cmdline-mode* *Command-line-mode* -Command-line mode *Cmdline* *Command-line* *mode-cmdline* *:* + *Cmdline-mode* *Command-line-mode* *Cmdline* +Command-line mode *cmdline* *Command-line* *mode-cmdline* *:* Command-line mode is used to enter Ex commands (":"), search patterns ("/" and "?"), and filter commands ("!"). @@ -163,12 +163,14 @@ CTRL-R CTRL-F *c_CTRL-R_CTRL-F* *c_<C-R>_<C-F>* CTRL-R CTRL-P *c_CTRL-R_CTRL-P* *c_<C-R>_<C-P>* CTRL-R CTRL-W *c_CTRL-R_CTRL-W* *c_<C-R>_<C-W>* CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>* +CTRL-R CTRL-L *c_CTRL-R_CTRL-L* *c_<C-R>_<C-L>* Insert the object under the cursor: CTRL-F the Filename under the cursor CTRL-P the Filename under the cursor, expanded with 'path' as in |gf| CTRL-W the Word under the cursor CTRL-A the WORD under the cursor; see |WORD| + CTRL-L the line under the cursor When 'incsearch' is set the cursor position at the end of the currently displayed match is used. With CTRL-W the part of @@ -176,8 +178,8 @@ CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>* *c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>* *c_CTRL-R_CTRL-O* *c_<C-R>_<C-O>* -CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A} -CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A} +CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L} +CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A CTRL-L} Insert register or object under the cursor. Works like |c_CTRL-R| but inserts the text literally. For example, if register a contains "xy^Hz" (where ^H is a backspace), @@ -210,7 +212,7 @@ CTRL-\ e {expr} *c_CTRL-\_e* *c_CTRL-Y* CTRL-Y When there is a modeless selection, copy the selection into - the clipboard. |modeless-selection| + the clipboard. If there is no selection CTRL-Y is inserted as a character. CTRL-M or CTRL-J *c_CTRL-M* *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR* @@ -376,10 +378,13 @@ CTRL-D List names that match the pattern in front of the cursor. match is inserted. After the last match, the first is used again (wrap around). The behavior can be changed with the 'wildmode' option. + *c_<S-Tab>* +<S-Tab> Like 'wildchar' or <Tab>, but begin with the last match and + then go to the previous match. *c_CTRL-N* CTRL-N After using 'wildchar' which got multiple matches, go to next match. Otherwise recall more recent command-line from history. -<S-Tab> *c_CTRL-P* *c_<S-Tab>* + *c_CTRL-P* CTRL-P After using 'wildchar' which got multiple matches, go to previous match. Otherwise recall older command-line from history. @@ -490,8 +495,46 @@ after a command causes the rest of the line to be ignored. This can be used to add comments. Example: > :set ai "set 'autoindent' option It is not possible to add a comment to a shell command ":!cmd" or to the -":map" command and a few others, because they see the '"' as part of their -argument. This is mentioned where the command is explained. +":map" command and a few others (mainly commands that expect expressions) +that see the '"' as part of their argument: + + :argdo + :autocmd + :bufdo + :cexpr (and the like) + :call + :cdo (and the like) + :command + :cscope (and the like) + :debug + :display + :echo (and the like) + :elseif + :execute + :folddoopen + :folddoclosed + :for + :grep (and the like) + :help (and the like) + :if + :let + :make + :map (and the like including :abbrev commands) + :menu (and the like) + :mkspell + :normal + :ownsyntax + :popup + :promptfind (and the like) + :registers + :return + :sort + :syntax + :tabdo + :tearoff + :vimgrep (and the like) + :while + :windo *:bar* *:\bar* '|' can be used to separate commands, so you can give multiple commands in one @@ -786,6 +829,11 @@ Also see |`=|. Note: these are typed literally, they are not special keys! <cword> is replaced with the word under the cursor (like |star|) <cWORD> is replaced with the WORD under the cursor (see |WORD|) + <cexpr> is replaced with the word under the cursor, including more + to form a C expression. E.g., when the cursor is on "arg" + of "ptr->arg" then the result is "ptr->arg"; when the + cursor is on "]" of "list[idx]" then the result is + "list[idx]". This is used for |v:beval_text|. <cfile> is replaced with the path name under the cursor (like what |gf| uses) <afile> When executing autocommands, is replaced with the file name @@ -834,7 +882,8 @@ These modifiers can be given, in this order: directory. :. Reduce file name to be relative to current directory, if possible. File name is unmodified if it is not below the - current directory. + current directory, but on MS-Windows the drive is removed if + it is the current drive. For maximum shortness, use ":~:.". :h Head of the file name (the last component and any separators removed). Cannot be used with :e, :r or :t. @@ -1098,4 +1147,4 @@ The character used for the pattern indicates the type of command-line: @ string for |input()| - text for |:insert| or |:append| - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: |