|
1 | | -*eval.txt* For Vim version 8.1. Last change: 2019 May 30 |
| 1 | +*eval.txt* For Vim version 8.1. Last change: 2019 Jun 06 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -1504,8 +1504,10 @@ One local buffer variable is predefined: |
1504 | 1504 | *b:changedtick* *changetick* |
1505 | 1505 | b:changedtick The total number of changes to the current buffer. It is |
1506 | 1506 | incremented for each change. An undo command is also a change |
1507 | | - in this case. This can be used to perform an action only when |
1508 | | - the buffer has changed. Example: > |
| 1507 | + in this case. Resetting 'modified' when writing the buffer is |
| 1508 | + also counted. |
| 1509 | + This can be used to perform an action only when the buffer has |
| 1510 | + changed. Example: > |
1509 | 1511 | :if my_changedtick != b:changedtick |
1510 | 1512 | : let my_changedtick = b:changedtick |
1511 | 1513 | : call My_Update() |
@@ -8597,7 +8599,7 @@ sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()* |
8597 | 8599 | priority sign priority |
8598 | 8600 |
|
8599 | 8601 | The returned signs in a buffer are ordered by their line |
8600 | | - number. |
| 8602 | + number and priority. |
8601 | 8603 |
|
8602 | 8604 | Returns an empty list on failure or if there are no placed |
8603 | 8605 | signs. |
@@ -9558,6 +9560,11 @@ term_dumpdiff({filename}, {filename} [, {options}]) |
9558 | 9560 | "curwin" use the current window, do not split the |
9559 | 9561 | window; fails if the current buffer |
9560 | 9562 | cannot be |abandon|ed |
| 9563 | + "bufnr" do not create a new buffer, use the |
| 9564 | + existing buffer "bufnr". This buffer |
| 9565 | + must have been previously created with |
| 9566 | + term_dumpdiff() or term_dumpload() and |
| 9567 | + visible in a window. |
9561 | 9568 | "norestore" do not add the terminal window to a |
9562 | 9569 | session file |
9563 | 9570 |
|
@@ -10329,6 +10336,8 @@ win_execute({id}, {command} [, {silent}]) *win_execute()* |
10329 | 10336 | call win_execute(winid, 'set syntax=python') |
10330 | 10337 | < Doing the same with `setwinvar()` would not trigger |
10331 | 10338 | autocommands and not actually show syntax highlighting. |
| 10339 | + *E994* |
| 10340 | + Not all commands are allowed in popup windows. |
10332 | 10341 |
|
10333 | 10342 | win_findbuf({bufnr}) *win_findbuf()* |
10334 | 10343 | Returns a list with |window-ID|s for windows that contain |
@@ -11578,7 +11587,7 @@ text... |
11578 | 11587 | opposite of |:lockvar|. |
11579 | 11588 |
|
11580 | 11589 |
|
11581 | | -:if {expr1} *:if* *:endif* *:en* *E171* *E579* *E580* |
| 11590 | +:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580* |
11582 | 11591 | :en[dif] Execute the commands until the next matching ":else" |
11583 | 11592 | or ":endif" if {expr1} evaluates to non-zero. |
11584 | 11593 |
|
@@ -13061,8 +13070,16 @@ missing: > |
13061 | 13070 | : echo "You will _never_ see this message" |
13062 | 13071 | :endif |
13063 | 13072 |
|
13064 | | -To execute a command only when the |+eval| feature is disabled requires a trick, |
13065 | | -as this example shows: > |
| 13073 | +To execute a command only when the |+eval| feature is disabled can be done in |
| 13074 | +two ways. The simplest is to exit the script (or Vim) prematurely: > |
| 13075 | + if 1 |
| 13076 | + echo "commands executed with +eval" |
| 13077 | + finish |
| 13078 | + endif |
| 13079 | + args " command executed without +eval |
| 13080 | +
|
| 13081 | +If you do not want to abort loading the script you can use a trick, as this |
| 13082 | +example shows: > |
13066 | 13083 |
|
13067 | 13084 | silent! while 0 |
13068 | 13085 | set history=111 |
|
0 commit comments