comparison 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
comparison
equal deleted inserted replaced
13050:2615e7a87cb2 13051:a6d3e2081544
1 *eval.txt* For Vim version 8.0. Last change: 2017 Dec 09 1 *eval.txt* For Vim version 8.0. Last change: 2017 Dec 16
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
2274 Number create directory {name} 2274 Number create directory {name}
2275 mode([expr]) String current editing mode 2275 mode([expr]) String current editing mode
2276 mzeval({expr}) any evaluate |MzScheme| expression 2276 mzeval({expr}) any evaluate |MzScheme| expression
2277 nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} 2277 nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
2278 nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr} 2278 nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr}
2279 option_restore({list}) none restore options saved by option_save()
2280 option_save({list}) List save options values
2279 or({expr}, {expr}) Number bitwise OR 2281 or({expr}, {expr}) Number bitwise OR
2280 pathshorten({expr}) String shorten directory names in a path 2282 pathshorten({expr}) String shorten directory names in a path
2281 perleval({expr}) any evaluate |Perl| expression 2283 perleval({expr}) any evaluate |Perl| expression
2282 pow({x}, {y}) Float {x} to the power of {y} 2284 pow({x}, {y}) Float {x} to the power of {y}
2283 prevnonblank({lnum}) Number line nr of non-blank line <= {lnum} 2285 prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
6112 Note that a NUL character in the file is specified with 6114 Note that a NUL character in the file is specified with
6113 nr2char(10), because NULs are represented with newline 6115 nr2char(10), because NULs are represented with newline
6114 characters. nr2char(0) is a real NUL and terminates the 6116 characters. nr2char(0) is a real NUL and terminates the
6115 string, thus results in an empty string. 6117 string, thus results in an empty string.
6116 6118
6119 option_restore({list}) *option_restore()*
6120 Restore options previously saved by option_save().
6121 When buffer-local options have been saved, this function must
6122 be called when the same buffer is the current buffer.
6123 When window-local options have been saved, this function must
6124 be called when the same window is the current window.
6125 When in the wrong buffer and/or window an error is given and
6126 the local options won't be restored.
6127 NOT IMPLEMENTED YET!
6128
6129 option_save({list}) *option_save()*
6130 Saves the options named in {list}. The returned value can be
6131 passed to option_restore(). Example: >
6132 let s:saved_options = option_save([
6133 \ 'ignorecase',
6134 \ 'iskeyword',
6135 \ ])
6136 au <buffer> BufLeave *
6137 \ call option_restore(s:saved_options)
6138 < The advantage over using `:let` is that global and local
6139 values are handled and the script ID is restored, so that
6140 `:verbose set` will show where the option was originally set,
6141 not where it was restored.
6142 NOT IMPLEMENTED YET!
6143
6117 or({expr}, {expr}) *or()* 6144 or({expr}, {expr}) *or()*
6118 Bitwise OR on the two arguments. The arguments are converted 6145 Bitwise OR on the two arguments. The arguments are converted
6119 to a number. A List, Dict or Float argument causes an error. 6146 to a number. A List, Dict or Float argument causes an error.
6120 Example: > 6147 Example: >
6121 :let bits = or(bits, 0x80) 6148 :let bits = or(bits, 0x80)