|
1 | | -*eval.txt* For Vim version 8.2. Last change: 2020 Mar 26 |
| 1 | +*eval.txt* For Vim version 8.2. Last change: 2020 Apr 08 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -5137,10 +5137,11 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* |
5137 | 5137 | < |
5138 | 5138 | *getcurpos()* |
5139 | 5139 | getcurpos() Get the position of the cursor. This is like getpos('.'), but |
5140 | | - includes an extra item in the list: |
5141 | | - [bufnum, lnum, col, off, curswant] ~ |
| 5140 | + includes an extra "curswant" item in the list: |
| 5141 | + [0, lnum, col, off, curswant] ~ |
5142 | 5142 | The "curswant" number is the preferred column when moving the |
5143 | 5143 | cursor vertically. Also see |getpos()|. |
| 5144 | + The first "bufnum" item is always zero. |
5144 | 5145 |
|
5145 | 5146 | This can be used to save and restore the cursor position: > |
5146 | 5147 | let save_cursor = getcurpos() |
@@ -8917,18 +8918,10 @@ settagstack({nr}, {dict} [, {action}]) *settagstack()* |
8917 | 8918 |
|
8918 | 8919 | Returns zero for success, -1 for failure. |
8919 | 8920 |
|
8920 | | - Examples: |
8921 | | - Set current index of the tag stack to 4: > |
8922 | | - call settagstack(1005, {'curidx' : 4}) |
8923 | | -
|
8924 | | -< Empty the tag stack of window 3: > |
| 8921 | + Examples (for more examples see |tagstack-examples||): |
| 8922 | + Empty the tag stack of window 3: > |
8925 | 8923 | call settagstack(3, {'items' : []}) |
8926 | 8924 |
|
8927 | | -< Push a new item onto the tag stack: > |
8928 | | - let pos = [bufnr('myfile.txt'), 10, 1, 0] |
8929 | | - let newtag = [{'tagname' : 'mytag', 'from' : pos}] |
8930 | | - call settagstack(2, {'items' : newtag}, 'a') |
8931 | | -
|
8932 | 8925 | < Save and restore the tag stack: > |
8933 | 8926 | let stack = gettagstack(1003) |
8934 | 8927 | " do something else |
@@ -10876,6 +10869,7 @@ hpux HP-UX version of Vim. |
10876 | 10869 | iconv Can use iconv() for conversion. |
10877 | 10870 | insert_expand Compiled with support for CTRL-X expansion commands in |
10878 | 10871 | Insert mode. (always true) |
| 10872 | +job Compiled with support for |channel| and |job| |
10879 | 10873 | jumplist Compiled with |jumplist| support. |
10880 | 10874 | keymap Compiled with 'keymap' support. |
10881 | 10875 | lambda Compiled with |lambda| support. |
@@ -11240,8 +11234,8 @@ It is allowed to define another function inside a function body. |
11240 | 11234 | You can provide default values for positional named arguments. This makes |
11241 | 11235 | them optional for function calls. When a positional argument is not |
11242 | 11236 | specified at a call, the default expression is used to initialize it. |
11243 | | -This only works for functions declared with `:function`, not for lambda |
11244 | | -expressions |expr-lambda|. |
| 11237 | +This only works for functions declared with `:function` or `:def`, not for |
| 11238 | +lambda expressions |expr-lambda|. |
11245 | 11239 |
|
11246 | 11240 | Example: > |
11247 | 11241 | function Something(key, value = 10) |
@@ -11279,9 +11273,10 @@ Example that does NOT work: > |
11279 | 11273 | :function NoGood(first = a:second, second = 10) |
11280 | 11274 | :endfunction |
11281 | 11275 | < |
11282 | | -When not using "...", the number of arguments in a function call must be equal |
11283 | | -to the number of mandatory named arguments. When using "...", the number of |
11284 | | -arguments may be larger. |
| 11276 | +When not using "...", the number of arguments in a function call must be at |
| 11277 | +least equal to the number of mandatory named arguments. When using "...", the |
| 11278 | +number of arguments may be larger than the total of mandatory and optional |
| 11279 | +arguments. |
11285 | 11280 |
|
11286 | 11281 | *local-variables* |
11287 | 11282 | Inside a function local variables can be used. These will disappear when the |
@@ -11638,7 +11633,7 @@ This does NOT work: > |
11638 | 11633 | Like above, but append/add/subtract the value for each |
11639 | 11634 | |List| item. |
11640 | 11635 |
|
11641 | | -:let [{name}, ..., ; {lastname}] = {expr1} |
| 11636 | +:let [{name}, ..., ; {lastname}] = {expr1} *E452* |
11642 | 11637 | Like |:let-unpack| above, but the |List| may have more |
11643 | 11638 | items than there are names. A list of the remaining |
11644 | 11639 | items is assigned to {lastname}. If there are no |
|
0 commit comments