diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-30 20:24:12 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-30 20:24:12 +0000 |
commit | 04fb916684829f6aa12f33f14d0d0023b458f200 (patch) | |
tree | 83db5549cd2d924541be05e0be54986f27f0a3d0 /runtime/doc/eval.txt | |
parent | d293981d2b76b40013143fe2302b910585e50808 (diff) |
Update runtime files
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3d2d203164..383920718f 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2021 Dec 27 +*eval.txt* For Vim version 8.2. Last change: 2021 Dec 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1724,9 +1724,9 @@ It is deleted when the tab page is closed. {not available when compiled without the |+windows| feature} *global-variable* *g:var* *g:* -Inside functions global variables are accessed with "g:". Omitting this will -access a variable local to a function. But "g:" can also be used in any other -place if you like. +Inside functions and in |Vim9| script global variables are accessed with "g:". +Omitting this will access a variable local to a function or script. "g:" +can also be used in any other place if you like. *local-variable* *l:var* *l:* Inside functions local variables are accessed without prepending anything. @@ -1736,8 +1736,10 @@ refers to "v:count". Using "l:count" you can have a local variable with the same name. *script-variable* *s:var* -In a Vim script variables starting with "s:" can be used. They cannot be -accessed from outside of the scripts, thus are local to the script. +In a legacy Vim script variables starting with "s:" can be used. They cannot +be accessed from outside of the scripts, thus are local to the script. +In |Vim9| script the "s:" prefix can be omitted, variables are script-local by +default. They can be used in: - commands executed while the script is sourced |