aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-05 14:10:32 -0700
committerJustin M. Keyes <justinkz@gmail.com>2019-09-05 14:10:32 -0700
commit8b06231612cd608b2dce5e0a09bf40192a4803cb (patch)
tree04fbfef7b326574e296b2fe1a772829ac0af8be4 /runtime
parent096212d52c6375c19c046d86a7178bae91e287fc (diff)
parentd3f1eb3024fa297c970a79dd24ef818e4aeb8525 (diff)
downloadrneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.gz
rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.bz2
rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.zip
Merge #10869 'vim-patch:8.1.{0309,0362,0365,0515,1946}'
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/cmdline.txt27
-rw-r--r--runtime/doc/eval.txt16
2 files changed, 28 insertions, 15 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 119fd924f1..46248899a0 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -816,11 +816,12 @@ it, no matter how many backslashes.
\\# \#
Also see |`=|.
- *:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
- *:<sfile>* *<sfile>* *:<afile>* *<afile>*
- *:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
- *:<cexpr>* *<cexpr>*
- *<slnum>* *E495* *E496* *E497* *E499* *E500*
+ *:<cword>* *<cword>* *:<cWORD>* *<cWORD>*
+ *:<cexpr>* *<cexpr>* *:<cfile>* *<cfile>*
+ *:<afile>* *<afile>* *:<abuf>* *<abuf>*
+ *:<amatch>* *<amatch>*
+ *:<sfile>* *<sfile>* *:<slnum>* *<slnum>*
+ *:<sflnum>* *<sflnum>* *E499* *E500*
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|)
@@ -833,15 +834,16 @@ Note: these are typed literally, they are not special keys!
|gf| uses)
<afile> When executing autocommands, is replaced with the file name
of the buffer being manipulated, or the file for a read or
- write.
+ write. *E495*
<abuf> When executing autocommands, is replaced with the currently
effective buffer number (for ":r file" and ":so file" it is
the current buffer, the file being read/sourced is not in a
- buffer).
+ buffer). *E496*
<amatch> When executing autocommands, is replaced with the match for
- which this autocommand was executed. It differs from
- <afile> only when the file name isn't used to match with
- (for FileType, Syntax and SpellFileMissing events).
+ which this autocommand was executed. *E497*
+ It differs from <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:
@@ -851,9 +853,12 @@ Note: these are typed literally, they are not special keys!
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*
+ line number. *E842*
When executing a function it's the line number relative to
the start of the function.
+ <sflnum> When executing a script, is replaced with the line number.
+ It differs from <slnum> in that <sflnum> is replaced with
+ the script line number in any situation. *E961*
*filename-modifiers*
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 7cafc16ce9..93bc7f868d 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -3595,7 +3595,10 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
<abuf> autocmd buffer number (as a String!)
<amatch> autocmd matched name
<sfile> sourced script file or function name
- <slnum> sourced script file line number
+ <slnum> sourced script line number or function
+ line number
+ <sflnum> script file line number, also when in
+ a function
<cword> word under the cursor
<cWORD> WORD under the cursor
<client> the {clientid} of the last received
@@ -5705,6 +5708,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
(|mapmode-ic|)
"sid" The script local ID, used for <sid> mappings
(|<SID>|).
+ "lnum" The line number in "sid", zero if unknown.
"nowait" Do not wait for other, longer mappings.
(|:map-<nowait>|).
@@ -9255,9 +9259,13 @@ See |:verbose-cmd| for more information.
deleted if there are no more references to it.
*E127* *E122*
When a function by this name already exists and [!] is
- not used an error message is given. When [!] is used,
- an existing function is silently replaced. Unless it
- is currently being executed, that is an error.
+ not used an error message is given. There is one
+ exception: When sourcing a script again, a function
+ that was previously defined in that script will be
+ silently replaced.
+ When [!] is used, an existing function is silently
+ replaced. Unless it is currently being executed, that
+ is an error.
NOTE: Use ! wisely. If used without care it can cause
an existing function to be replaced unexpectedly,
which is hard to debug.