diff runtime/doc/map.txt @ 21594:5daca8504c63 v8.2.1347

patch 8.2.1347: cannot easily get the script ID Commit: https://github.com/vim/vim/commit/909443028b57d7514ce3c71f00e9d808f2126b4f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 1 20:45:11 2020 +0200 patch 8.2.1347: cannot easily get the script ID Problem: Cannot easily get the script ID. Solution: Support expand('<SID>').
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Aug 2020 21:00:04 +0200
parents 3a1ed539ae2a
children 1b345fb68ae3
line wrap: on
line diff
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1167,6 +1167,10 @@ When executing an autocommand or a user 
 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