|
1 | | -*usr_41.txt* For Vim version 9.1. Last change: 2025 Jul 21 |
| 1 | +*usr_41.txt* For Vim version 9.1. Last change: 2025 Aug 10 |
2 | 2 |
|
3 | 3 | VIM USER MANUAL - by Bram Moolenaar |
4 | 4 |
|
@@ -30,10 +30,10 @@ Table of contents: |usr_toc.txt| |
30 | 30 | *41.1* Introduction *vim-script-intro* *script* |
31 | 31 |
|
32 | 32 | Let's start with some nomenclature. A Vim script is any file that Vim can |
33 | | -interpret and execute. This includes files written in Vim's scripting language |
34 | | -like for example .vim files or configuration files like .vimrc and .gvimrc. |
35 | | -These scripts may define functions, commands and settings that Vim uses to |
36 | | -customize and extend its behavior. |
| 33 | +interpret and execute. This includes files written in Vim's scripting |
| 34 | +language like for example .vim files or configuration files like .vimrc and |
| 35 | +.gvimrc. These scripts may define functions, commands and settings that Vim |
| 36 | +uses to customize and extend its behavior. |
37 | 37 |
|
38 | 38 | *vim-script-notation* |
39 | 39 | The correct notation is "Vim script" (or "Vim9 script" when refering to the |
@@ -125,8 +125,8 @@ make such a loop, it can be written much more compact: > |
125 | 125 | echo $"count is {i}" |
126 | 126 | endfor |
127 | 127 |
|
128 | | -We won't explain how `for`, `range()`and `$"string"` work until later. Follow |
129 | | -the links if you are impatient. |
| 128 | +We won't explain how `for`, `range()` and `$"string"` work until later. |
| 129 | +Follow the links if you are impatient. |
130 | 130 |
|
131 | 131 |
|
132 | 132 | TRYING OUT EXAMPLES |
@@ -749,7 +749,7 @@ String manipulation: *string-functions* |
749 | 749 | str2list() get list of numbers from a string |
750 | 750 | str2nr() convert a string to a Number |
751 | 751 | str2float() convert a string to a Float |
752 | | - printf() format a string according to % items |
| 752 | + printf() format a string according to "%" items |
753 | 753 | escape() escape characters in a string with a '\' |
754 | 754 | shellescape() escape a string for use with a shell command |
755 | 755 | fnameescape() escape a file name for use with a Vim command |
@@ -832,9 +832,8 @@ List manipulation: *list-functions* |
832 | 832 | range() return a List with a sequence of numbers |
833 | 833 | string() String representation of a List |
834 | 834 | call() call a function with List as arguments |
835 | | - index() index of a value in a List or Blob |
836 | | - indexof() index in a List or Blob where an expression |
837 | | - evaluates to true |
| 835 | + index() index of a value in a List |
| 836 | + indexof() index in a List where an expression is true |
838 | 837 | max() maximum value in a List |
839 | 838 | min() minimum value in a List |
840 | 839 | count() count number of times a value appears in a List |
@@ -918,6 +917,8 @@ Blob manipulation: *blob-functions* |
918 | 917 | blob2list() get a list of numbers from a blob |
919 | 918 | list2blob() get a blob from a list of numbers |
920 | 919 | reverse() reverse the order of numbers in a blob |
| 920 | + index() index of a value in a Blob |
| 921 | + indexof() index in a Blob where an expression is true |
921 | 922 |
|
922 | 923 | Other computation: *bitwise-function* |
923 | 924 | and() bitwise AND |
@@ -1456,9 +1457,9 @@ Various: *various-functions* |
1456 | 1457 |
|
1457 | 1458 | luaeval() evaluate |Lua| expression |
1458 | 1459 | mzeval() evaluate |MzScheme| expression |
1459 | | - perleval() evaluate Perl expression (|+perl|) |
1460 | | - py3eval() evaluate Python expression (|+python3|) |
1461 | | - pyeval() evaluate Python expression (|+python|) |
| 1460 | + perleval() evaluate Perl expression |
| 1461 | + py3eval() evaluate Python expression |
| 1462 | + pyeval() evaluate Python expression |
1462 | 1463 | pyxeval() evaluate |python_x| expression |
1463 | 1464 | rubyeval() evaluate |Ruby| expression |
1464 | 1465 |
|
@@ -1586,7 +1587,7 @@ once for every line in the range, with the cursor in that line. Example: > |
1586 | 1587 |
|
1587 | 1588 | If you call this function with: > |
1588 | 1589 |
|
1589 | | - :10,15Number() |
| 1590 | + :10,15call Number() |
1590 | 1591 |
|
1591 | 1592 | The function will be called six times, starting on line 10 and ending on line |
1592 | 1593 | 15. |
|
0 commit comments