|
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 19 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -2276,6 +2276,8 @@ mode([expr]) String current editing mode |
2276 | 2276 | mzeval({expr}) any evaluate |MzScheme| expression |
2277 | 2277 | nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} |
2278 | 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 | 2281 | or({expr}, {expr}) Number bitwise OR |
2280 | 2282 | pathshorten({expr}) String shorten directory names in a path |
2281 | 2283 | perleval({expr}) any evaluate |Perl| expression |
@@ -3336,8 +3338,8 @@ count({comp}, {expr} [, {ic} [, {start}]]) *count()* |
3336 | 3338 | When {ic} is given and it's |TRUE| then case is ignored. |
3337 | 3339 |
|
3338 | 3340 | When {comp} is a string then the number of not overlapping |
3339 | | - occurrences of {expr} is returned. |
3340 | | - |
| 3341 | + occurrences of {expr} is returned. Zero is returned when |
| 3342 | + {expr} is an empty string. |
3341 | 3343 |
|
3342 | 3344 | *cscope_connection()* |
3343 | 3345 | cscope_connection([{num} , {dbpath} [, {prepend}]]) |
@@ -4672,6 +4674,8 @@ getqflist([{what}]) *getqflist()* |
4672 | 4674 | If the optional {what} dictionary argument is supplied, then |
4673 | 4675 | returns only the items listed in {what} as a dictionary. The |
4674 | 4676 | following string items are supported in {what}: |
| 4677 | + changedtick get the total number of changes made |
| 4678 | + to the list |
4675 | 4679 | context get the context stored with |setqflist()| |
4676 | 4680 | efm errorformat to use when parsing "lines". If |
4677 | 4681 | not present, then the 'errorformat' option |
@@ -4705,6 +4709,8 @@ getqflist([{what}]) *getqflist()* |
4705 | 4709 | "items" with the list of entries. |
4706 | 4710 |
|
4707 | 4711 | The returned dictionary contains the following entries: |
| 4712 | + changedtick total number of changes made to the |
| 4713 | + list |quickfix-changedtick| |
4708 | 4714 | context context information stored with |setqflist()|. |
4709 | 4715 | If not present, set to "". |
4710 | 4716 | id quickfix list ID |quickfix-ID|. If not |
@@ -6114,6 +6120,31 @@ nr2char({expr} [, {utf8}]) *nr2char()* |
6114 | 6120 | characters. nr2char(0) is a real NUL and terminates the |
6115 | 6121 | string, thus results in an empty string. |
6116 | 6122 |
|
| 6123 | +option_restore({list}) *option_restore()* |
| 6124 | + Restore options previously saved by option_save(). |
| 6125 | + When buffer-local options have been saved, this function must |
| 6126 | + be called when the same buffer is the current buffer. |
| 6127 | + When window-local options have been saved, this function must |
| 6128 | + be called when the same window is the current window. |
| 6129 | + When in the wrong buffer and/or window an error is given and |
| 6130 | + the local options won't be restored. |
| 6131 | + NOT IMPLEMENTED YET! |
| 6132 | + |
| 6133 | +option_save({list}) *option_save()* |
| 6134 | + Saves the options named in {list}. The returned value can be |
| 6135 | + passed to option_restore(). Example: > |
| 6136 | + let s:saved_options = option_save([ |
| 6137 | + \ 'ignorecase', |
| 6138 | + \ 'iskeyword', |
| 6139 | + \ ]) |
| 6140 | + au <buffer> BufLeave * |
| 6141 | + \ call option_restore(s:saved_options) |
| 6142 | +< The advantage over using `:let` is that global and local |
| 6143 | + values are handled and the script ID is restored, so that |
| 6144 | + `:verbose set` will show where the option was originally set, |
| 6145 | + not where it was restored. |
| 6146 | + NOT IMPLEMENTED YET! |
| 6147 | + |
6117 | 6148 | or({expr}, {expr}) *or()* |
6118 | 6149 | Bitwise OR on the two arguments. The arguments are converted |
6119 | 6150 | to a number. A List, Dict or Float argument causes an error. |
|
0 commit comments