Mercurial > vim
diff runtime/doc/eval.txt @ 13051:a6d3e2081544
Update runtime files
commit https://github.com/vim/vim/commit/f0b03c4e98f8a7184d8b4a5d702cbcd602426923
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 17 17:17:07 2017 +0100
Update runtime files
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Dec 2017 17:30:05 +0100 |
parents | 6e81a68d63a1 |
children | 6479dadcf214 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2017 Dec 09 +*eval.txt* For Vim version 8.0. Last change: 2017 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2276,6 +2276,8 @@ mode([expr]) String current editing mo mzeval({expr}) any evaluate |MzScheme| expression 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 or({expr}, {expr}) Number bitwise OR pathshorten({expr}) String shorten directory names in a path perleval({expr}) any evaluate |Perl| expression @@ -6114,6 +6116,31 @@ nr2char({expr} [, {utf8}]) *nr2char() characters. nr2char(0) is a real NUL and terminates the string, thus results in an empty string. +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.