|
1 | | -*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 09 |
| 1 | +*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 28 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -136,7 +136,6 @@ complete({startcol}, {matches}) none set Insert mode completion |
136 | 136 | complete_add({expr}) Number add completion match |
137 | 137 | complete_check() Number check for key typed during completion |
138 | 138 | complete_info([{what}]) Dict get current completion information |
139 | | -complete_match([{lnum}, {col}]) List get completion column and trigger text |
140 | 139 | confirm({msg} [, {choices} [, {default} [, {type}]]]) |
141 | 140 | Number number of choice picked by user |
142 | 141 | copy({expr}) any make a shallow copy of {expr} |
@@ -909,7 +908,7 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()* |
909 | 908 | for an invalid {lnum}, since {lnum} isn't actually used. |
910 | 909 |
|
911 | 910 | Can also be used as a |method| after a List, the base is |
912 | | - passed as the second argument: > |
| 911 | + passed as the third argument: > |
913 | 912 | mylist->appendbufline(buf, lnum) |
914 | 913 | < |
915 | 914 | Return type: |Number| |
@@ -2072,51 +2071,6 @@ complete_info([{what}]) *complete_info()* |
2072 | 2071 | Return type: dict<any> |
2073 | 2072 |
|
2074 | 2073 |
|
2075 | | -complete_match([{lnum}, {col}]) *complete_match()* |
2076 | | - Searches backward from the given position and returns a List |
2077 | | - of matches according to the 'isexpand' option. When no |
2078 | | - arguments are provided, uses the current cursor position. |
2079 | | - |
2080 | | - Each match is represented as a List containing |
2081 | | - [startcol, trigger_text] where: |
2082 | | - - startcol: column position where completion should start, |
2083 | | - or -1 if no trigger position is found. For multi-character |
2084 | | - triggers, returns the column of the first character. |
2085 | | - - trigger_text: the matching trigger string from 'isexpand', |
2086 | | - or empty string if no match was found or when using the |
2087 | | - default 'iskeyword' pattern. |
2088 | | - |
2089 | | - When 'isexpand' is empty, uses the 'iskeyword' pattern "\k\+$" |
2090 | | - to find the start of the current keyword. |
2091 | | - |
2092 | | - Examples: > |
2093 | | - set isexpand=.,->,/,/*,abc |
2094 | | - func CustomComplete() |
2095 | | - let res = complete_match() |
2096 | | - if res->len() == 0 | return | endif |
2097 | | - let [col, trigger] = res[0] |
2098 | | - let items = [] |
2099 | | - if trigger == '/*' |
2100 | | - let items = ['/** */'] |
2101 | | - elseif trigger == '/' |
2102 | | - let items = ['/*! */', '// TODO:', '// fixme:'] |
2103 | | - elseif trigger == '.' |
2104 | | - let items = ['length()'] |
2105 | | - elseif trigger =~ '^\->' |
2106 | | - let items = ['map()', 'reduce()'] |
2107 | | - elseif trigger =~ '^\abc' |
2108 | | - let items = ['def', 'ghk'] |
2109 | | - endif |
2110 | | - if items->len() > 0 |
2111 | | - let startcol = trigger =~ '^/' ? col : col + len(trigger) |
2112 | | - call complete(startcol, items) |
2113 | | - endif |
2114 | | - endfunc |
2115 | | - inoremap <Tab> <Cmd>call CustomComplete()<CR> |
2116 | | -< |
2117 | | - Return type: list<list<any>> |
2118 | | - |
2119 | | - |
2120 | 2074 | confirm({msg} [, {choices} [, {default} [, {type}]]]) *confirm()* |
2121 | 2075 | confirm() offers the user a dialog, from which a choice can be |
2122 | 2076 | made. It returns the number of the choice. For the first |
@@ -6819,9 +6773,10 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()* |
6819 | 6773 | The entries are in the order the changes were made, thus the |
6820 | 6774 | most recent change is at the end. |
6821 | 6775 |
|
6822 | | - Because of the third trigger reason for triggering a callback |
6823 | | - listed above, the line numbers passed to the callback are not |
6824 | | - guaranteed to be valid. If this is a problem then make |
| 6776 | + Because of the third reason for triggering a callback listed |
| 6777 | + above, the line numbers passed to the callback are not |
| 6778 | + guaranteed to be valid. In particular, the end value can be |
| 6779 | + greater than line('$') + 1. If this is a problem then make |
6825 | 6780 | {unbuffered} |TRUE|. |
6826 | 6781 |
|
6827 | 6782 | When {unbuffered} is |TRUE| the {callback} is invoked for every |
|
0 commit comments