diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-06-24 14:27:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-24 14:27:31 +0200 |
commit | f2e384910029afc12279b56aa212a227a69428bd (patch) | |
tree | 2afca0bf4fb3b97b26916a7dad9bc916b799745c /runtime | |
parent | 433c136a8a274539fb58c2a2ef4f606dd7829fef (diff) | |
parent | 3e8bc4a13f196ec1f721c065d8a79a52252ca015 (diff) | |
download | rneovim-f2e384910029afc12279b56aa212a227a69428bd.tar.gz rneovim-f2e384910029afc12279b56aa212a227a69428bd.tar.bz2 rneovim-f2e384910029afc12279b56aa212a227a69428bd.zip |
Merge #10313 from rhysd/const-patches
vim-patch:8.1.1539,8.1.1543,8.1.1554 for :const from Vim
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 4eaa72ee68..a17808e298 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -9629,7 +9629,29 @@ This does NOT work: > No error message is given for a non-existing variable, also without !. If the system does not support deleting an environment - variable, it is made emtpy. + variable, it is made empty. + + *:cons* *:const* +:cons[t] {var-name} = {expr1} +:cons[t] [{name1}, {name2}, ...] = {expr1} +:cons[t] [{name}, ..., ; {lastname}] = {expr1} + Similar to |:let|, but additionally lock the variable + after setting the value. This is the same as locking + the variable with |:lockvar| just after |:let|, thus: > + :const x = 1 +< is equivalent to: > + :let x = 1 + :lockvar 1 x +< This is useful if you want to make sure the variable + is not modified. + *E995* + |:const| does not allow to for changing a variable. > + :let x = 1 + :const x = 2 " Error! +< *E996* + Note that environment variables, option values and + register values cannot be used here, since they cannot + be locked. :lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv* Lock the internal variable {name}. Locking means that |