diff options
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6e678790bb..7b1857883b 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2194,6 +2194,8 @@ msgpackdump({list}) List dump a list of objects to msgpack msgpackparse({list}) List parse msgpack to a list of objects nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr} +option_restore({list}) none restore options saved by option_save() +option_save({list}) List save options values nvim_...({args}...) any call nvim |api| functions or({expr}, {expr}) Number bitwise OR pathshorten({expr}) String shorten directory names in a path @@ -5882,6 +5884,31 @@ nvim_...({...}) *nvim_...()* *eval-api* also take the numerical value 0 to indicate the current (focused) object. +option_restore({list}) *option_restore()* + Restore options previously saved by option_save(). + When buffer-local options have been saved, this function must + be called when the same buffer is the current buffer. + When window-local options have been saved, this function must + be called when the same window is the current window. + When in the wrong buffer and/or window an error is given and + the local options won't be restored. + NOT IMPLEMENTED YET! + +option_save({list}) *option_save()* + Saves the options named in {list}. The returned value can be + passed to option_restore(). Example: > + let s:saved_options = option_save([ + \ 'ignorecase', + \ 'iskeyword', + \ ]) + au <buffer> BufLeave * + \ call option_restore(s:saved_options) +< The advantage over using `:let` is that global and local + values are handled and the script ID is restored, so that + `:verbose set` will show where the option was originally set, + not where it was restored. + NOT IMPLEMENTED YET! + or({expr}, {expr}) *or()* Bitwise OR on the two arguments. The arguments are converted to a number. A List, Dict or Float argument causes an error. |