-
Notifications
You must be signed in to change notification settings - Fork 65
Update builtin.{txt,jax} #2062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update builtin.{txt,jax} #2062
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
*builtin.txt* For Vim version 9.1. Last change: 2025 Apr 18 | ||
*builtin.txt* For Vim version 9.1. Last change: 2025 Apr 27 | ||
|
||
|
||
VIM REFERENCE MANUAL by Bram Moolenaar | ||
|
@@ -129,11 +129,14 @@ charidx({string}, {idx} [, {countcc} [, {utf16}]]) | |
chdir({dir}) String change current working directory | ||
cindent({lnum}) Number C indent for line {lnum} | ||
clearmatches([{win}]) none clear all matches | ||
cmdcomplete_info() Dict get current cmdline completion | ||
information | ||
col({expr} [, {winid}]) Number column byte index of cursor or mark | ||
complete({startcol}, {matches}) none set Insert mode completion | ||
complete_add({expr}) Number add completion match | ||
complete_check() Number check for key typed during completion | ||
complete_info([{what}]) Dict get current completion information | ||
complete_match([{lnum}, {col}]) List get completion column and trigger text | ||
confirm({msg} [, {choices} [, {default} [, {type}]]]) | ||
Number number of choice picked by user | ||
copy({expr}) any make a shallow copy of {expr} | ||
|
@@ -1832,6 +1835,29 @@ clearmatches([{win}]) *clearmatches()* | |
Return type: |Number| | ||
|
||
|
||
cmdcomplete_info() *cmdcomplete_info()* | ||
Returns a |Dictionary| with information about cmdline | ||
completion. See |cmdline-completion|. | ||
The items are: | ||
cmdline_orig The original command-line string before | ||
completion began. | ||
pum_visible |TRUE| if popup menu is visible. | ||
See |pumvisible()|. | ||
matches List of all completion candidates. Each item | ||
is a string. | ||
selected Selected item index. First index is zero. | ||
Index is -1 if no item is selected (showing | ||
typed text only, or the last completion after | ||
no item is selected when using the <Up> or | ||
<Down> keys) | ||
|
||
Returns an empty |Dictionary| if no completion was attempted, | ||
if there was only one candidate and it was fully completed, or | ||
if an error occurred. | ||
|
||
Return type: dict<any> | ||
|
||
|
||
col({expr} [, {winid}]) *col()* | ||
The result is a Number, which is the byte index of the column | ||
position given with {expr}. | ||
|
@@ -2007,6 +2033,50 @@ complete_info([{what}]) *complete_info()* | |
< | ||
Return type: dict<any> | ||
|
||
complete_match([{lnum}, {col}]) *complete_match()* | ||
Searches backward from the given position and returns a List | ||
of matches according to the 'isexpand' option. When no | ||
arguments are provided, uses the current cursor position. | ||
|
||
Each match is represented as a List containing | ||
[startcol, trigger_text] where: | ||
- startcol: column position where completion should start, | ||
or -1 if no trigger position is found. For multi-character | ||
triggers, returns the column of the first character. | ||
- trigger_text: the matching trigger string from 'isexpand', | ||
or empty string if no match was found or when using the | ||
default 'iskeyword' pattern. | ||
|
||
When 'isexpand' is empty, uses the 'iskeyword' pattern | ||
"\k\+$" to find the start of the current keyword. | ||
|
||
Examples: > | ||
set isexpand=.,->,/,/*,abc | ||
func CustomComplete() | ||
let res = complete_match() | ||
if res->len() == 0 | return | endif | ||
let [col, trigger] = res[0] | ||
let items = [] | ||
if trigger == '/*' | ||
let items = ['/** */'] | ||
elseif trigger == '/' | ||
let items = ['/*! */', '// TODO:', '// fixme:'] | ||
elseif trigger == '.' | ||
let items = ['length()'] | ||
elseif trigger =~ '^\->' | ||
let items = ['map()', 'reduce()'] | ||
elseif trigger =~ '^\abc' | ||
let items = ['def', 'ghk'] | ||
endif | ||
if items->len() > 0 | ||
let startcol = trigger =~ '^/' ? col : col + len(trigger) | ||
call complete(startcol, items) | ||
endif | ||
endfunc | ||
inoremap <Tab> <Cmd>call CustomComplete()<CR> | ||
< | ||
Return type: list<list<any>> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. これ、元から空行2行じゃないんですね(それも徹底されてるルールなのか不明ですけど) |
||
*confirm()* | ||
confirm({msg} [, {choices} [, {default} [, {type}]]]) | ||
confirm() offers the user a dialog, from which a choice can be | ||
|
@@ -3235,7 +3305,8 @@ finddir({name} [, {path} [, {count}]]) *finddir()* | |
Can also be used as a |method|: > | ||
GetName()->finddir() | ||
< | ||
Return type: |String| | ||
Return type: list<string> if {count} is negative, |String| | ||
otherwise | ||
|
||
|
||
findfile({name} [, {path} [, {count}]]) *findfile()* | ||
|
@@ -3249,7 +3320,8 @@ findfile({name} [, {path} [, {count}]]) *findfile()* | |
Can also be used as a |method|: > | ||
GetName()->findfile() | ||
< | ||
Return type: |String| | ||
Return type: list<string> if {count} is negative, |String| | ||
otherwise | ||
|
||
|
||
flatten({list} [, {maxdepth}]) *flatten()* | ||
|
@@ -4243,6 +4315,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* | |
file file and directory names | ||
file_in_path file and directory names in |'path'| | ||
filetype filetype names |'filetype'| | ||
filetypecmd |:filetype| suboptions | ||
function function name | ||
help help subjects | ||
highlight highlight groups | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.