|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*autocmd.txt* For Vim version 9.1. Last change: 2025 Apr
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -398,6 +398,7 @@ Name triggered by ~
|
|
| 398 |
|CmdlineChanged| after a change was made to the command-line text
|
| 399 |
|CmdlineEnter| after the cursor moves to the command line
|
| 400 |
|CmdlineLeave| before the cursor leaves the command line
|
|
|
|
| 401 |
|
| 402 |
|InsertEnter| starting Insert mode
|
| 403 |
|InsertChange| when typing <Insert> while in Insert or Replace mode
|
|
@@ -639,6 +640,18 @@ CmdlineLeave Before leaving the command line; including
|
|
| 639 |
<afile> is set to a single character,
|
| 640 |
indicating the type of command-line.
|
| 641 |
|cmdwin-char|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 642 |
*CmdwinEnter*
|
| 643 |
CmdwinEnter After entering the command-line window.
|
| 644 |
Useful for setting options specifically for
|
| 1 |
+
*autocmd.txt* For Vim version 9.1. Last change: 2025 Apr 21
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 398 |
|CmdlineChanged| after a change was made to the command-line text
|
| 399 |
|CmdlineEnter| after the cursor moves to the command line
|
| 400 |
|CmdlineLeave| before the cursor leaves the command line
|
| 401 |
+
|CmdlineLeavePre| before preparing to leave the command line
|
| 402 |
|
| 403 |
|InsertEnter| starting Insert mode
|
| 404 |
|InsertChange| when typing <Insert> while in Insert or Replace mode
|
| 640 |
<afile> is set to a single character,
|
| 641 |
indicating the type of command-line.
|
| 642 |
|cmdwin-char|
|
| 643 |
+
*CmdlineLeavePre*
|
| 644 |
+
CmdlineLeavePre Just before leaving the command line, and
|
| 645 |
+
before |CmdlineLeave|. Useful for capturing
|
| 646 |
+
completion info with |cmdcomplete_info()|, as
|
| 647 |
+
this information is cleared before
|
| 648 |
+
|CmdlineLeave| is triggered. Triggered for
|
| 649 |
+
non-interactive use of ":" in a mapping, but
|
| 650 |
+
not when using |<Cmd>|. Also triggered when
|
| 651 |
+
abandoning the command line by typing CTRL-C
|
| 652 |
+
or <Esc>. <afile> is set to a single
|
| 653 |
+
character indicating the command-line type.
|
| 654 |
+
See |cmdwin-char| for details.
|
| 655 |
*CmdwinEnter*
|
| 656 |
CmdwinEnter After entering the command-line window.
|
| 657 |
Useful for setting options specifically for
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*builtin.txt* For Vim version 9.1. Last change: 2025 Apr
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -129,6 +129,8 @@ charidx({string}, {idx} [, {countcc} [, {utf16}]])
|
|
| 129 |
chdir({dir}) String change current working directory
|
| 130 |
cindent({lnum}) Number C indent for line {lnum}
|
| 131 |
clearmatches([{win}]) none clear all matches
|
|
|
|
|
|
|
| 132 |
col({expr} [, {winid}]) Number column byte index of cursor or mark
|
| 133 |
complete({startcol}, {matches}) none set Insert mode completion
|
| 134 |
complete_add({expr}) Number add completion match
|
|
@@ -1832,6 +1834,29 @@ clearmatches([{win}]) *clearmatches()*
|
|
| 1832 |
Return type: |Number|
|
| 1833 |
|
| 1834 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1835 |
col({expr} [, {winid}]) *col()*
|
| 1836 |
The result is a Number, which is the byte index of the column
|
| 1837 |
position given with {expr}.
|
|
@@ -3235,7 +3260,8 @@ finddir({name} [, {path} [, {count}]]) *finddir()*
|
|
| 3235 |
Can also be used as a |method|: >
|
| 3236 |
GetName()->finddir()
|
| 3237 |
<
|
| 3238 |
-
Return type: |String|
|
|
|
|
| 3239 |
|
| 3240 |
|
| 3241 |
findfile({name} [, {path} [, {count}]]) *findfile()*
|
|
@@ -3249,7 +3275,8 @@ findfile({name} [, {path} [, {count}]]) *findfile()*
|
|
| 3249 |
Can also be used as a |method|: >
|
| 3250 |
GetName()->findfile()
|
| 3251 |
<
|
| 3252 |
-
Return type: |String|
|
|
|
|
| 3253 |
|
| 3254 |
|
| 3255 |
flatten({list} [, {maxdepth}]) *flatten()*
|
| 1 |
+
*builtin.txt* For Vim version 9.1. Last change: 2025 Apr 21
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 129 |
chdir({dir}) String change current working directory
|
| 130 |
cindent({lnum}) Number C indent for line {lnum}
|
| 131 |
clearmatches([{win}]) none clear all matches
|
| 132 |
+
cmdcomplete_info() Dict get current cmdline completion
|
| 133 |
+
information
|
| 134 |
col({expr} [, {winid}]) Number column byte index of cursor or mark
|
| 135 |
complete({startcol}, {matches}) none set Insert mode completion
|
| 136 |
complete_add({expr}) Number add completion match
|
| 1834 |
Return type: |Number|
|
| 1835 |
|
| 1836 |
|
| 1837 |
+
cmdcomplete_info([{what}]) *cmdcomplete_info()*
|
| 1838 |
+
Returns a |Dictionary| with information about cmdline
|
| 1839 |
+
completion. See |cmdline-completion|.
|
| 1840 |
+
The items are:
|
| 1841 |
+
cmdline_orig The original command-line string before
|
| 1842 |
+
completion began.
|
| 1843 |
+
pum_visible |TRUE| if popup menu is visible.
|
| 1844 |
+
See |pumvisible()|.
|
| 1845 |
+
matches List of all completion candidates. Each item
|
| 1846 |
+
is a string.
|
| 1847 |
+
selected Selected item index. First index is zero.
|
| 1848 |
+
Index is -1 if no item is selected (showing
|
| 1849 |
+
typed text only, or the last completion after
|
| 1850 |
+
no item is selected when using the <Up> or
|
| 1851 |
+
<Down> keys)
|
| 1852 |
+
|
| 1853 |
+
Returns an empty |Dictionary| if no completion was attempted,
|
| 1854 |
+
if there was only one candidate and it was fully completed, or
|
| 1855 |
+
if an error occurred.
|
| 1856 |
+
|
| 1857 |
+
Return type: dict<any>
|
| 1858 |
+
|
| 1859 |
+
|
| 1860 |
col({expr} [, {winid}]) *col()*
|
| 1861 |
The result is a Number, which is the byte index of the column
|
| 1862 |
position given with {expr}.
|
| 3260 |
Can also be used as a |method|: >
|
| 3261 |
GetName()->finddir()
|
| 3262 |
<
|
| 3263 |
+
Return type: list<string> if {count} is negative, |String|
|
| 3264 |
+
otherwise
|
| 3265 |
|
| 3266 |
|
| 3267 |
findfile({name} [, {path} [, {count}]]) *findfile()*
|
| 3275 |
Can also be used as a |method|: >
|
| 3276 |
GetName()->findfile()
|
| 3277 |
<
|
| 3278 |
+
Return type: list<string> if {count} is negative, |String|
|
| 3279 |
+
otherwise
|
| 3280 |
|
| 3281 |
|
| 3282 |
flatten({list} [, {maxdepth}]) *flatten()*
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*helphelp.txt* For Vim version 9.1. Last change: 2025 Apr
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -383,6 +383,10 @@ standard Vim help files, except for the first line. If you are writing a new
|
|
| 383 |
help file it's best to copy one of the existing files and use it as a
|
| 384 |
template.
|
| 385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 386 |
The first line in a help file should have the following format:
|
| 387 |
|
| 388 |
*plugin_name.txt* {short description of the plugin}
|
| 1 |
+
*helphelp.txt* For Vim version 9.1. Last change: 2025 Apr 21
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 383 |
help file it's best to copy one of the existing files and use it as a
|
| 384 |
template.
|
| 385 |
|
| 386 |
+
Vim help files generally use 2 spaces after a sentence (since they are written
|
| 387 |
+
using a fixed-width font and that was the prefered style in the 70s/80s), like
|
| 388 |
+
what is described here: https://english.stackexchange.com/a/2602
|
| 389 |
+
|
| 390 |
The first line in a help file should have the following format:
|
| 391 |
|
| 392 |
*plugin_name.txt* {short description of the plugin}
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*usr_41.txt* For Vim version 9.1. Last change: 2025
|
| 2 |
|
| 3 |
VIM USER MANUAL - by Bram Moolenaar
|
| 4 |
|
|
@@ -1111,6 +1111,7 @@ Command line: *command-line-functions*
|
|
| 1111 |
getcmdwintype() return the current command-line window type
|
| 1112 |
getcompletion() list of command-line completion matches
|
| 1113 |
fullcommand() get full command name
|
|
|
|
| 1114 |
|
| 1115 |
Quickfix and location lists: *quickfix-functions*
|
| 1116 |
getqflist() list of quickfix errors
|
| 1 |
+
*usr_41.txt* For Vim version 9.1. Last change: 2025 Apr 21
|
| 2 |
|
| 3 |
VIM USER MANUAL - by Bram Moolenaar
|
| 4 |
|
| 1111 |
getcmdwintype() return the current command-line window type
|
| 1112 |
getcompletion() list of command-line completion matches
|
| 1113 |
fullcommand() get full command name
|
| 1114 |
+
cmdcomplete_info() get command-line completion information
|
| 1115 |
|
| 1116 |
Quickfix and location lists: *quickfix-functions*
|
| 1117 |
getqflist() list of quickfix errors
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*various.txt* For Vim version 9.1. Last change: 2025
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -98,7 +98,9 @@ g8 Print the hex values of the bytes used in the
|
|
| 98 |
|
| 99 |
*:p* *:pr* *:print* *E749*
|
| 100 |
:[range]p[rint] [flags]
|
| 101 |
-
Print [range] lines (default current line).
|
|
|
|
|
|
|
| 102 |
Note: If you are looking for a way to print your text
|
| 103 |
on paper see |:hardcopy|. In the GUI you can use the
|
| 104 |
File.Print menu entry.
|
| 1 |
+
*various.txt* For Vim version 9.1. Last change: 2025 Apr 21
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 98 |
|
| 99 |
*:p* *:pr* *:print* *E749*
|
| 100 |
:[range]p[rint] [flags]
|
| 101 |
+
Print [range] lines (default current line). Can also
|
| 102 |
+
be spelled `:[range]|` due to Vi compatibility (see
|
| 103 |
+
|:bar|). Gives an error in an empty buffer.
|
| 104 |
Note: If you are looking for a way to print your text
|
| 105 |
on paper see |:hardcopy|. In the GUI you can use the
|
| 106 |
File.Print menu entry.
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*version9.txt* For Vim version 9.1. Last change: 2025 Apr
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -41685,6 +41685,7 @@ Functions: ~
|
|
| 41685 |
|base64_encode()| encode a blob into a base64 string
|
| 41686 |
|blob2str()| convert a blob into a List of strings
|
| 41687 |
|bindtextdomain()| set message lookup translation base path
|
|
|
|
| 41688 |
|diff()| diff two Lists of strings
|
| 41689 |
|filecopy()| copy a file {from} to {to}
|
| 41690 |
|foreach()| apply function to List items
|
|
@@ -41708,6 +41709,7 @@ Functions: ~
|
|
| 41708 |
|
| 41709 |
Autocommands: ~
|
| 41710 |
|
|
|
|
| 41711 |
|CursorMovedC| after the cursor was moved in the command-line
|
| 41712 |
|KeyInputPre| before processing any key event in any mode
|
| 41713 |
|SessionWritePost| after writing the session file |:mksession|
|
| 1 |
+
*version9.txt* For Vim version 9.1. Last change: 2025 Apr 21
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 41685 |
|base64_encode()| encode a blob into a base64 string
|
| 41686 |
|blob2str()| convert a blob into a List of strings
|
| 41687 |
|bindtextdomain()| set message lookup translation base path
|
| 41688 |
+
|cmdcomplete_info()| get current cmdline completion info
|
| 41689 |
|diff()| diff two Lists of strings
|
| 41690 |
|filecopy()| copy a file {from} to {to}
|
| 41691 |
|foreach()| apply function to List items
|
| 41709 |
|
| 41710 |
Autocommands: ~
|
| 41711 |
|
| 41712 |
+
|CmdlineLeavePre| before preparing to leave the command line
|
| 41713 |
|CursorMovedC| after the cursor was moved in the command-line
|
| 41714 |
|KeyInputPre| before processing any key event in any mode
|
| 41715 |
|SessionWritePost| after writing the session file |:mksession|
|
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
*vim9class.txt* For Vim version 9.1. Last change: 2025 Apr
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
@@ -1067,8 +1067,7 @@ The above enum definition is equivalent to the following class definition: >
|
|
| 1067 |
public const ordinal: number
|
| 1068 |
endclass
|
| 1069 |
<
|
| 1070 |
-
A enum can contain object variables and methods just like a regular
|
| 1071 |
-
class: >
|
| 1072 |
|
| 1073 |
enum Color
|
| 1074 |
Cyan([0, 255, 255]),
|
| 1 |
+
*vim9class.txt* For Vim version 9.1. Last change: 2025 Apr 21
|
| 2 |
|
| 3 |
|
| 4 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
| 1067 |
public const ordinal: number
|
| 1068 |
endclass
|
| 1069 |
<
|
| 1070 |
+
A enum can contain object variables and methods just like a regular class: >
|
|
|
|
| 1071 |
|
| 1072 |
enum Color
|
| 1073 |
Cyan([0, 255, 255]),
|