diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-01 20:45:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-01 20:45:11 +0200 |
commit | 909443028b57d7514ce3c71f00e9d808f2126b4f (patch) | |
tree | 1d574ce00cdb456fbd241dadb493ed652d657a40 /runtime | |
parent | 491799be5084dde7aa3367462f306e7b71dbc4a5 (diff) | |
download | vim-git-909443028b57d7514ce3c71f00e9d808f2126b4f.tar.gz |
patch 8.2.1347: cannot easily get the script IDv8.2.1347
Problem: Cannot easily get the script ID.
Solution: Support expand('<SID>').
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/map.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 0ad43d449..79c46f712 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1167,6 +1167,10 @@ When executing an autocommand or a user command, it will run in the context of the script it was defined in. This makes it possible that the command calls a local function or uses a local mapping. +In case the value is used in a context where <SID> cannot be correctly +expanded, use the expand() function: > + let &includexpr = expand('<SID>') .. 'My_includeexpr()' + Otherwise, using "<SID>" outside of a script context is an error. If you need to get the script number to use in a complicated script, you can |