aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/cmdline.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/cmdline.txt')
-rw-r--r--runtime/doc/cmdline.txt50
1 files changed, 31 insertions, 19 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index d85d41a295..a123ea711b 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 7.4. Last change: 2014 Sep 06
+*cmdline.txt* For Vim version 7.4. Last change: 2015 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,6 +97,11 @@ CTRL-E or <End> *c_CTRL-E* *c_<End>* *c_End*
*c_<LeftMouse>*
<LeftMouse> Move the cursor to the position of the mouse click.
+ *c_<MiddleMouse>*
+<MiddleMouse> Paste the contents of the clipboard (for X11 the primary
+ selection). This is similar to using CTRL-R *, but no CR
+ characters are inserted between lines.
+
CTRL-H *c_<BS>* *c_CTRL-H* *c_BS*
<BS> Delete the character in front of the cursor.
*c_<Del>* *c_Del*
@@ -379,7 +384,7 @@ CTRL-N After using 'wildchar' which got multiple matches, go to next
<S-Tab> *c_CTRL-P* *c_<S-Tab>*
CTRL-P After using 'wildchar' which got multiple matches, go to
previous match. Otherwise recall older command-line from
- history. <S-Tab> only works with the GUI and with MS-DOS.
+ history. <S-Tab> only works with the GUI.
*c_CTRL-A*
CTRL-A All names that match the pattern in front of the cursor are
inserted.
@@ -482,6 +487,8 @@ followed by another Vim command:
:argdo
:autocmd
:bufdo
+ :cdo
+ :cfdo
:command
:cscope
:debug
@@ -490,8 +497,9 @@ followed by another Vim command:
:function
:global
:help
- :helpfind
:lcscope
+ :ldo
+ :lfdo
:make
:normal
:promptfind
@@ -562,6 +570,7 @@ starts editing the three files "foo bar", "goes to" and "school ".
When you want to use the special characters '"' or '|' in a command, or want
to use '%' or '#' in a file name, precede them with a backslash. The
backslash is not required in a range and in the ":substitute" command.
+See also |`=|.
*:_!*
The '!' (bang) character after an Ex command makes the command behave in a
@@ -711,13 +720,13 @@ to insert special things while typing you can use the CTRL-R command. For
example, "%" stands for the current file name, while CTRL-R % inserts the
current file name right away. See |c_CTRL-R|.
-Note: If you want to avoid the special characters in a Vim script you may want
-to use |fnameescape()|.
+Note: If you want to avoid the effects of special characters in a Vim script
+you may want to use |fnameescape()|. Also see |`=|.
In Ex commands, at places where a file name can be used, the following
characters have a special meaning. These can also be used in the expression
-function expand() |expand()|.
+function |expand()|.
% Is replaced with the current file name. *:_%* *c_%*
# Is replaced with the alternate file name. *:_#* *c_#*
This is remembered for every window.
@@ -752,6 +761,7 @@ it, no matter how many backslashes.
# alternate.file
\# #
\\# \#
+Also see |`=|.
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
@@ -773,13 +783,13 @@ Note: these are typed literally, they are not special keys!
<afile> only when the file name isn't used to match with
(for FileType, Syntax and SpellFileMissing events).
<sfile> When executing a ":source" command, is replaced with the
- file name of the sourced file. *E498*
- When executing a function, is replaced with
- "function {function-name}"; function call nesting is
- indicated like this:
- "function {function-name1}..{function-name2}". Note that
- filename-modifiers are useless when <sfile> is used inside
- a function.
+ file name of the sourced file. *E498*
+ When executing a function, is replaced with:
+ "function {function-name}[{lnum}]"
+ function call nesting is indicated like this:
+ "function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
+ Note that filename-modifiers are useless when <sfile> is
+ used inside a function.
<slnum> When executing a ":source" command, is replaced with the
line number. *E842*
When executing a function it's the line number relative to
@@ -816,7 +826,7 @@ These modifiers can be given, in this order:
separator is removed. Thus ":p:h" on a directory name results
on the directory name itself (without trailing slash).
When the file name is an absolute path (starts with "/" for
- Unix; "x:\" for MS-DOS and WIN32), that part is not removed.
+ Unix; "x:\" for Windows), that part is not removed.
When there is no head (path is relative to current directory)
the result is empty.
:t Tail of the file name (last component of the name). Must
@@ -841,7 +851,7 @@ These modifiers can be given, in this order:
:gs?pat?sub?
Substitute all occurrences of "pat" with "sub". Otherwise
this works like ":s".
- :S Escape special characters for use with a shell command (see
+ :S Escape special characters for use with a shell command (see
|shellescape()|). Must be the last one. Examples: >
:!dir <cfile>:S
:call system('chmod +w -- ' . expand('%:S'))
@@ -894,9 +904,8 @@ name). This is included for backwards compatibility with version 3.0, the
Note: Where a file name is expected wildcards expansion is done. On Unix the
shell is used for this, unless it can be done internally (for speed).
-Backticks also work, like in >
+Unless in |restricted-mode|, backticks work also, like in >
:n `echo *.c`
-(backtick expansion is not possible in |restricted-mode|)
But expansion is only done if there are any wildcards before expanding the
'%', '#', etc.. This avoids expanding wildcards inside a file name. If you
want to expand the result of <cfile>, add a wildcard character to it.
@@ -907,6 +916,7 @@ Examples: (alternate file name is "?readme?")
:e #.* :e {files matching "?readme?.*"}
:cd <cfile> :cd {file name under cursor}
:cd <cfile>* :cd {file name under cursor plus "*" and then expanded}
+Also see |`=|.
When the expanded argument contains a "!" and it is used for a shell command
(":!cmd", ":r !cmd" or ":w !cmd"), the "!" is escaped with a backslash to
@@ -915,8 +925,8 @@ option contains "sh", this is done twice, to avoid the shell trying to expand
the "!".
*filename-backslash*
-For filesystems that use a backslash as directory separator (MS-DOS and
-Windows), it's a bit difficult to recognize a backslash that is used
+For filesystems that use a backslash as directory separator (Windows
+filesystems), it's a bit difficult to recognize a backslash that is used
to escape the special meaning of the next character. The general rule is: If
the backslash is followed by a normal file name character, it does not have a
special meaning. Therefore "\file\foo" is a valid file name, you don't have
@@ -933,6 +943,8 @@ for the file "$home" in the root directory. A few examples:
/\$home file "$home" in root directory
\\$home file "\\", followed by expanded $home
+Also see |`=|.
+
==============================================================================
7. Command-line window *cmdline-window* *cmdwin*
*command-line-window*