diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-02 22:38:15 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-14 18:20:28 -0400 |
commit | 7a047d8dc2dff4078649290696b3e507aaaf8f04 (patch) | |
tree | fdbbbe2e0cf31a413c585e5553bd2c3f002cf3e0 /runtime | |
parent | 0680b5218e29f2ebb947d61210d8775ff720f8bb (diff) | |
download | rneovim-7a047d8dc2dff4078649290696b3e507aaaf8f04.tar.gz rneovim-7a047d8dc2dff4078649290696b3e507aaaf8f04.tar.bz2 rneovim-7a047d8dc2dff4078649290696b3e507aaaf8f04.zip |
vim-patch:8.2.1347: cannot easily get the script ID
Problem: Cannot easily get the script ID.
Solution: Support expand('<SID>').
https://github.com/vim/vim/commit/909443028b57d7514ce3c71f00e9d808f2126b4f
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 a2b7aca4fd..1514f03c55 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1078,6 +1078,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 |