diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-08-23 18:12:28 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-23 18:12:28 +0800 |
| commit | df4709ddf6d1ed524adae9373ecb762b9db11814 (patch) | |
| tree | d65ac06e9560138c20f09d6f8269b4d9e2d29713 /runtime/doc | |
| parent | 42e9fe7d958e0ba025034c330d8e29293d828b60 (diff) | |
| parent | d459b6687704b7d1f230d0b14c0d59f87cf5f67d (diff) | |
| download | rneovim-df4709ddf6d1ed524adae9373ecb762b9db11814.tar.gz rneovim-df4709ddf6d1ed524adae9373ecb762b9db11814.tar.bz2 rneovim-df4709ddf6d1ed524adae9373ecb762b9db11814.zip | |
Merge pull request #19905 from zeertzjq/vim-8.2.4726
vim-patch:8.2.{4726,4740,4741,4749,4841,4842}: expand('<script>')
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/builtin.txt | 5 | ||||
| -rw-r--r-- | runtime/doc/cmdline.txt | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index a47eae8274..df00c67082 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2013,6 +2013,8 @@ expand({string} [, {nosuf} [, {list}]]) *expand()* a function <SID> "<SNR>123_" where "123" is the current script ID |<SID>| + <script> sourced script file, or script file + where the current function was defined <stack> call stack <cword> word under the cursor <cWORD> WORD under the cursor @@ -2046,6 +2048,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()* is not defined, an empty string is used. Using "%:p" in a buffer with no name, results in the current directory, with a '/' added. + When 'verbose' is set then expanding '%', '#' and <> items + will result in an error message if the argument cannot be + expanded. When {string} does not start with '%', '#' or '<', it is expanded like a file name is expanded on the command line. diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 29eff75bfa..f19671e713 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -881,7 +881,7 @@ Note: these are typed literally, they are not special keys! file name of the sourced file. *E498* When executing a function, is replaced with the call stack, as with <stack> (this is for backwards compatibility, using - <stack> is preferred). + <stack> or <script> is preferred). Note that filename-modifiers are useless when <sfile> is not used inside a script. *:<stack>* *<stack>* @@ -891,6 +891,12 @@ Note: these are typed literally, they are not special keys! ".." in between items. E.g.: "function {function-name1}[{lnum}]..{function-name2}[{lnum}]" If there is no call stack you get error *E489* . + *:<script>* *<script>* + <script> When executing a `:source` command, is replaced with the file + name of the sourced file. When executing a function, is + replaced with the file name of the script where it is + defined. + If the file name cannot be determined you get error *E1274* . *:<slnum>* *<slnum>* <slnum> When executing a `:source` command, is replaced with the line number. *E842* |