vim-patch:partial:c58f91c: runtime(doc): Whitespace updates (#36160)

Use double sentence spacing and wrap lines at 'textwidth'.  Code
examples and tables were not wrapped unless this had already been done
locally.

closes: vim/vim#18453

c58f91c035

Fix incorrect docs in :h ModeChanged.
Cherry-pick :h bufnr() changes from patch 8.1.2080.

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
zeertzjq
2025-10-13 16:53:21 +08:00
committed by GitHub
parent 7468db5187
commit a65202e6bd
51 changed files with 1541 additions and 1478 deletions

View File

@@ -774,7 +774,7 @@ MenuPopup Just before showing the popup menu (under the
*ModeChanged* *ModeChanged*
ModeChanged After changing the mode. The pattern is ModeChanged After changing the mode. The pattern is
matched against `'old_mode:new_mode'`, for matched against `'old_mode:new_mode'`, for
example match against `*:c` to simulate example match against `*:c*` to simulate
|CmdlineEnter|. |CmdlineEnter|.
The following values of |v:event| are set: The following values of |v:event| are set:
old_mode The mode before it changed. old_mode The mode before it changed.

View File

@@ -82,7 +82,7 @@ For inserting text see |insert.txt|.
These commands delete text. You can repeat them with the `.` command These commands delete text. You can repeat them with the `.` command
(except `:d`) and undo them. Use Visual mode to delete blocks of text. See (except `:d`) and undo them. Use Visual mode to delete blocks of text. See
|registers| for an explanation of registers. |registers| for an explanation of registers.
*d-special*
An exception for the d{motion} command: If the motion is not linewise, the An exception for the d{motion} command: If the motion is not linewise, the
start and end of the motion are not in the same line, and there are only start and end of the motion are not in the same line, and there are only
blanks before the start and there are no non-blanks after the end of the blanks before the start and there are no non-blanks after the end of the
@@ -1128,9 +1128,9 @@ inside of strings can change! Also see 'softtabstop' option. >
or 'a'. or 'a'.
["x]zp or *zp* *zP* ["x]zp or *zp* *zP*
["x]zP Like "p" and "P", except without adding trailing spaces ["x]zP Like "p" and "P", except without adding trailing
when pasting a block. Thus the inserted text will not spaces when pasting a block. Thus the inserted text
always be a rectangle. Especially useful in will not always be a rectangle. Especially useful in
combination with |v_zy|. combination with |v_zy|.
You can use these commands to copy text from one place to another. Do this You can use these commands to copy text from one place to another. Do this
@@ -1244,8 +1244,8 @@ text is less than one line (the small delete register is used then). An
exception is made for the delete operator with these movement commands: |%|, exception is made for the delete operator with these movement commands: |%|,
|(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|. |(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|.
Register "1 is always used then (this is Vi compatible). The "- register is Register "1 is always used then (this is Vi compatible). The "- register is
used as well if the delete is within a line. Note that these characters may be used as well if the delete is within a line. Note that these characters may
mapped. E.g. |%| is mapped by the matchit plugin. be mapped. E.g. |%| is mapped by the matchit plugin.
With each successive deletion or change, Vim shifts the previous contents With each successive deletion or change, Vim shifts the previous contents
of register 1 into register 2, 2 into 3, and so forth, losing the previous of register 1 into register 2, 2 into 3, and so forth, losing the previous
contents of register 9. contents of register 9.
@@ -1566,8 +1566,8 @@ type of comment string. A part consists of:
{digits} {digits}
When together with 's' or 'e': add {digit} amount of offset to an When together with 's' or 'e': add {digit} amount of offset to an
automatically inserted middle or end comment leader. The offset begins automatically inserted middle or end comment leader. The offset
from a left alignment. See below for more details. begins from a left alignment. See below for more details.
-{digits} -{digits}
Like {digits} but reduce the indent. This only works when there is Like {digits} but reduce the indent. This only works when there is
@@ -1609,11 +1609,11 @@ Here is an example of alignment flags at work to make a comment stand out
(kind of looks like a 1 too). Consider comment string: >vim (kind of looks like a 1 too). Consider comment string: >vim
:set comments=sr:/***,m:**,ex-2:******/ :set comments=sr:/***,m:**,ex-2:******/
> >
/*** ~ /***
**<--right aligned from "r" flag ~ **<--right aligned from "r" flag
** ~ **
offset 2 spaces for the "-2" flag-->** ~ offset 2 spaces for the "-2" flag-->**
******/ ~ ******/
In this case, the first comment was typed, then return was pressed 4 times, In this case, the first comment was typed, then return was pressed 4 times,
then "/" was pressed to end the comment. then "/" was pressed to end the comment.
@@ -1629,10 +1629,10 @@ will override the "r" and "l" flag.
Enabling 'cindent' will override the alignment flags in many cases. Enabling 'cindent' will override the alignment flags in many cases.
Reindenting using a different method like |gq| or |=| will not consult Reindenting using a different method like |gq| or |=| will not consult
alignment flags either. The same behaviour can be defined in those other alignment flags either. The same behaviour can be defined in those other
formatting options. One consideration is that 'cindent' has additional options formatting options. One consideration is that 'cindent' has additional
for context based indenting of comments but cannot replicate many three piece options for context based indenting of comments but cannot replicate many
indent alignments. However, 'indentexpr' has the ability to work better with three piece indent alignments. However, 'indentexpr' has the ability to work
three piece comments. better with three piece comments.
Other examples: > Other examples: >
"b:*" Includes lines starting with "*", but not if the "*" is "b:*" Includes lines starting with "*", but not if the "*" is
@@ -1764,8 +1764,8 @@ Note that when 'textwidth' is 0, Vim does no automatic formatting anyway (but
does insert comment leaders according to the 'comments' option). An exception does insert comment leaders according to the 'comments' option). An exception
is when the 'a' flag is present. |auto-format| is when the 'a' flag is present. |auto-format|
Note that 'textwidth' can be non-zero even if Vim never performs auto-wrapping; Note that 'textwidth' can be non-zero even if Vim never performs
'textwidth' is still useful for formatting with "gq". auto-wrapping; 'textwidth' is still useful for formatting with "gq".
If the 'comments' option includes "/*", "*" and/or "*/", then Vim has some If the 'comments' option includes "/*", "*" and/or "*/", then Vim has some
built in stuff to treat these types of comments a bit more cleverly. built in stuff to treat these types of comments a bit more cleverly.

View File

@@ -157,7 +157,8 @@ CTRL-R {register} *c_CTRL-R* *c_<C-R>*
the last delete or yank the last delete or yank
'%' the current file name '%' the current file name
'#' the alternate file name '#' the alternate file name
"*" the clipboard contents (X11: primary selection) "*" the clipboard contents (X11: primary
selection)
'+' the clipboard contents '+' the clipboard contents
'/' the last search pattern '/' the last search pattern
':' the last command-line ':' the last command-line
@@ -416,7 +417,8 @@ CTRL-D List names that match the pattern in front of the cursor.
then go to the previous match. then go to the previous match.
*c_CTRL-N* *c_CTRL-N*
CTRL-N After using 'wildchar' which got multiple matches, go to next CTRL-N After using 'wildchar' which got multiple matches, go to next
match. Otherwise recall more recent command-line from history. match. Otherwise recall more recent command-line from
history.
*c_CTRL-P* *c_CTRL-P*
CTRL-P After using 'wildchar' which got multiple matches, go to CTRL-P After using 'wildchar' which got multiple matches, go to
previous match. Otherwise recall older command-line from previous match. Otherwise recall older command-line from
@@ -684,9 +686,9 @@ See also |`=|.
*:_!* *:_!*
The '!' (bang) character after an Ex command makes the command behave in a The '!' (bang) character after an Ex command makes the command behave in a
different way. The '!' should be placed immediately after the command, without different way. The '!' should be placed immediately after the command,
any blanks in between. If you insert blanks the '!' will be seen as an without any blanks in between. If you insert blanks the '!' will be seen as
argument for the command, which has a different meaning. For example: an argument for the command, which has a different meaning. For example:
:w! name write the current buffer to file "name", overwriting :w! name write the current buffer to file "name", overwriting
any existing file any existing file
:w !name send the current buffer as standard input to command :w !name send the current buffer as standard input to command
@@ -1024,8 +1026,10 @@ Note: these are typed literally, they are not special keys!
*filename-modifiers* *filename-modifiers*
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S* *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
*%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S* *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S*
The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<script>", The file name modifiers can be used after "%", "#", "#n", "<cfile>",
"<afile>" or "<abuf>". They are also used with the |fnamemodify()| function. "<script>", "<afile>" or "<abuf>". They are also used with the |fnamemodify()|
function.
These modifiers can be given, in this order: These modifiers can be given, in this order:
:p Make file name a full path. Must be the first modifier. Also :p Make file name a full path. Must be the first modifier. Also
changes "~/" (and "~user/" for Unix) to the path for the home changes "~/" (and "~user/" for Unix) to the path for the home
@@ -1157,9 +1161,9 @@ special meaning. Therefore "\file\foo" is a valid file name, you don't have
to type the backslash twice. to type the backslash twice.
An exception is the '$' sign. It is a valid character in a file name. But An exception is the '$' sign. It is a valid character in a file name. But
to avoid a file name like "$home" to be interpreted as an environment variable, to avoid a file name like "$home" to be interpreted as an environment
it needs to be preceded by a backslash. Therefore you need to use "/\$home" variable, it needs to be preceded by a backslash. Therefore you need to use
for the file "$home" in the root directory. A few examples: "/\$home" for the file "$home" in the root directory. A few examples:
FILE NAME INTERPRETED AS ~ FILE NAME INTERPRETED AS ~
$home expanded to value of environment var $home $home expanded to value of environment var $home

View File

@@ -55,7 +55,8 @@ Vim would never have become what it is now, without the help of these people!
Felix von Leitner Previous maintainer of Vim Mailing Lists Felix von Leitner Previous maintainer of Vim Mailing Lists
David Leonard Port of Python extensions to Unix David Leonard Port of Python extensions to Unix
Avner Lottem Edit in right-to-left windows Avner Lottem Edit in right-to-left windows
Flemming Madsen X11 client-server, various features and patches Flemming Madsen X11 client-server, various features and
patches
Tony Mechelynck answers many user questions Tony Mechelynck answers many user questions
Paul Moore Python interface extensions, many patches Paul Moore Python interface extensions, many patches
Katsuhito Nagano Work on multibyte versions Katsuhito Nagano Work on multibyte versions

View File

@@ -130,10 +130,10 @@ choose Attach to a Process. Select the Vim process and click OK.
At this point, choose Symbol File Path on the File menu, and add the folder At this point, choose Symbol File Path on the File menu, and add the folder
containing your Vim PDB to the sympath. If you have Vim source available, containing your Vim PDB to the sympath. If you have Vim source available,
use Source File Path on the File menu. You can now open source files in WinDbg use Source File Path on the File menu. You can now open source files in
and set breakpoints, if you like. Reproduce your crash. WinDbg should open the WinDbg and set breakpoints, if you like. Reproduce your crash. WinDbg should
source file at the point of the crash. Using the View menu, you can examine open the source file at the point of the crash. Using the View menu, you can
the call stack, local variables, watch windows, and so on. examine the call stack, local variables, watch windows, and so on.
If WinDbg is your postmortem debugger, you do not need to attach WinDbg to If WinDbg is your postmortem debugger, you do not need to attach WinDbg to
your Vim process. Simply reproduce the crash and WinDbg will launch your Vim process. Simply reproduce the crash and WinDbg will launch
@@ -151,8 +151,8 @@ In Visual Studio 2005: on the File menu, choose Open, then Project/Solution.
Navigate to the .dmp file and open it. Now press F5 to invoke the debugger. Navigate to the .dmp file and open it. Now press F5 to invoke the debugger.
Follow the instructions in |debug-vs2005| to set the Symbol File Path. Follow the instructions in |debug-vs2005| to set the Symbol File Path.
In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions
|debug-windbg| to set the Symbol File Path. in |debug-windbg| to set the Symbol File Path.
*get-ms-debuggers* *get-ms-debuggers*
3.5 Obtaining Microsoft Debugging Tools ~ 3.5 Obtaining Microsoft Debugging Tools ~

View File

@@ -62,7 +62,8 @@ See `:diffoff` for an easy way to revert the options.
The differences shown are actually the differences in the buffer. Thus if you The differences shown are actually the differences in the buffer. Thus if you
make changes after loading a file, these will be included in the displayed make changes after loading a file, these will be included in the displayed
diffs. You might have to do ":diffupdate" now and then, not all changes are diffs. You might have to do ":diffupdate" now and then, not all changes are
immediately taken into account, especially when using an external diff command. immediately taken into account, especially when using an external diff
command.
In your vimrc file you could do something special when Vim was started in In your vimrc file you could do something special when Vim was started in
diff mode. You could use a construct like this: > diff mode. You could use a construct like this: >

View File

@@ -124,9 +124,9 @@ set, Vim renames or copies the original file before it will be overwritten.
You can use this file if you discover that you need the original file. See You can use this file if you discover that you need the original file. See
also the 'patchmode' option. The name of the backup file is normally the same also the 'patchmode' option. The name of the backup file is normally the same
as the original file with 'backupext' appended. The default "~" is a bit as the original file with 'backupext' appended. The default "~" is a bit
strange to avoid accidentally overwriting existing files. If you prefer ".bak" strange to avoid accidentally overwriting existing files. If you prefer
change the 'backupext' option. The backup file can be placed in another ".bak" change the 'backupext' option. The backup file can be placed in
directory by setting 'backupdir'. another directory by setting 'backupdir'.
When you started editing without giving a file name, "No File" is displayed in When you started editing without giving a file name, "No File" is displayed in
messages. If the ":write" command is used with a file name argument, the file messages. If the ":write" command is used with a file name argument, the file
@@ -1577,24 +1577,24 @@ If it has changed, Vim will ask if you really want to overwrite the file:
WARNING: The file has been changed since reading it!!! WARNING: The file has been changed since reading it!!!
Do you really want to write to it (y/n)? Do you really want to write to it (y/n)?
If you hit 'y' Vim will continue writing the file. If you hit 'n' the write is If you hit 'y' Vim will continue writing the file. If you hit 'n' the write
aborted. If you used ":wq" or "ZZ" Vim will not exit, you will get another is aborted. If you used ":wq" or "ZZ" Vim will not exit, you will get another
chance to write the file. chance to write the file.
The message would normally mean that somebody has written to the file after The message would normally mean that somebody has written to the file after
the edit session started. This could be another person, in which case you the edit session started. This could be another person, in which case you
probably want to check if your changes to the file and the changes from the probably want to check if your changes to the file and the changes from the
other person should be merged. Write the file under another name and check for other person should be merged. Write the file under another name and check
differences (the "diff" program can be used for this). for differences (the "diff" program can be used for this).
It is also possible that you modified the file yourself, from another edit It is also possible that you modified the file yourself, from another edit
session or with another command (e.g., a filter command). Then you will know session or with another command (e.g., a filter command). Then you will know
which version of the file you want to keep. which version of the file you want to keep.
The accuracy of the time check depends on the filesystem. On Unix it is The accuracy of the time check depends on the filesystem. On Unix it is
usually sub-second. With old file systems and on MS-Windows it is normally one usually sub-second. With old file systems and on MS-Windows it is normally
second. Use `has('nanotime')` to check if sub-second time stamp checks are one second. Use `has('nanotime')` to check if sub-second time stamp checks
available. are available.
There is one situation where you get the message while there is nothing wrong: There is one situation where you get the message while there is nothing wrong:
On a Win32 system on the day daylight saving time starts. There is something On a Win32 system on the day daylight saving time starts. There is something
@@ -1624,8 +1624,8 @@ There are three different types of searching:
- It ONLY matches directories. - It ONLY matches directories.
- It matches up to 30 directories deep by default, so you can use it to - It matches up to 30 directories deep by default, so you can use it to
search an entire directory tree search an entire directory tree
- The maximum number of levels matched can be given by appending a number - The maximum number of levels matched can be given by appending a
to "**". number to "**".
Thus '/usr/**2' can match: > Thus '/usr/**2' can match: >
/usr /usr
/usr/include /usr/include

View File

@@ -489,12 +489,13 @@ g:changelog_new_date_format
%% insert a single '%' character %% insert a single '%' character
%d insert the date from above %d insert the date from above
%u insert the user from above %u insert the user from above
%p insert result of b:changelog_entry_prefix %p insert result of
b:changelog_entry_prefix
%c where to position cursor when done %c where to position cursor when done
The default is "%d %u\n\n\t* %p%c\n\n", which produces The default is "%d %u\n\n\t* %p%c\n\n", which
something like (| is where cursor will be, unless at produces something like (| is where cursor will be,
the start of the line where it denotes the beginning unless at the start of the line where it denotes the
of the line) > beginning of the line) >
|2003-01-14 Full Name <user@host> |2003-01-14 Full Name <user@host>
| |
| * prefix| | * prefix|
@@ -503,7 +504,8 @@ g:changelog_new_entry_format
The format used when creating a new entry. The format used when creating a new entry.
The following table describes special tokens in the The following table describes special tokens in the
string: string:
%p insert result of b:changelog_entry_prefix %p insert result of
b:changelog_entry_prefix
%c where to position cursor when done %c where to position cursor when done
The default is "\t*%c", which produces something The default is "\t*%c", which produces something
similar to > similar to >
@@ -563,8 +565,9 @@ Options:
'expandtab' is switched on to avoid tabs as required by the Fortran 'expandtab' is switched on to avoid tabs as required by the Fortran
standards unless the user has set fortran_have_tabs in vimrc. standards unless the user has set fortran_have_tabs in vimrc.
'textwidth' is set to 80 for fixed source format whereas it is set to 132 'textwidth' is set to 80 for fixed source format whereas it is set to 132
for free source format. Setting the fortran_extended_line_length for free source format. Setting the
variable increases the width to 132 for fixed source format. fortran_extended_line_length variable increases the width to
132 for fixed source format.
'formatoptions' is set to break code and comment lines and to preserve long 'formatoptions' is set to break code and comment lines and to preserve long
lines. You can format comments with |gq|. lines. You can format comments with |gq|.
For further discussion of fortran_have_tabs and the method used for the For further discussion of fortran_have_tabs and the method used for the
@@ -924,8 +927,8 @@ your |vimrc|: >
let rmd_include_html = 1 let rmd_include_html = 1
The 'formatexpr' option is set dynamically with different values for R code The 'formatexpr' option is set dynamically with different values for R code
and for Markdown code. If you prefer that 'formatexpr' is not set, add to your and for Markdown code. If you prefer that 'formatexpr' is not set, add to
|vimrc|: > your |vimrc|: >
let rmd_dynamic_comments = 0 let rmd_dynamic_comments = 0

View File

@@ -885,8 +885,8 @@ The tip is defined like this: >
And delete it with: > And delete it with: >
:tunmenu MyMenu.Hello :tunmenu MyMenu.Hello
Tooltips are currently only supported for the X11 and Win32 GUI. However, they Tooltips are currently only supported for the X11 and Win32 GUI. However,
should appear for the other gui platforms in the not too distant future. they should appear for the other gui platforms in the not too distant future.
The ":tmenu" command works just like other menu commands, it uses the same The ":tmenu" command works just like other menu commands, it uses the same
arguments. ":tunmenu" deletes an existing menu tip, in the same way as the arguments. ":tunmenu" deletes an existing menu tip, in the same way as the

View File

@@ -365,8 +365,8 @@ color. E.g.
Column heading ~ Column heading ~
To separate sections in a help file, place a series of '=' characters in a To separate sections in a help file, place a series of '=' characters in a
line starting from the first column. The section separator line is highlighted line starting from the first column. The section separator line is
differently. highlighted differently.
*help-codeblock* *help-codeblock*
To quote a block of ex-commands verbatim, place a greater than (>) character To quote a block of ex-commands verbatim, place a greater than (>) character

View File

@@ -49,11 +49,11 @@ To see what version of perl you have: >
*:perldo* *:perldo*
:[range]perldo {cmd} Execute perl command {cmd} for each line in the[range], :[range]perldo {cmd} Execute perl command {cmd} for each line in the[range],
with $_ being set to the test of each line in turn, with $_ being set to the test of each line in turn,
without a trailing <EOL>. In addition to $_, $line and without a trailing <EOL>. In addition to $_, $line
$linenr is also set to the line content and line number and $linenr is also set to the line content and line
respectively. Setting $_ will change the text, but note number respectively. Setting $_ will change the text,
that it is not possible to add or delete lines using but note that it is not possible to add or delete
this command. lines using this command.
The default for [range] is the whole file: "1,$". The default for [range] is the whole file: "1,$".
Examples: Examples:

View File

@@ -281,8 +281,8 @@ vim.options *python-options*
getting items) providing a read-write access to global options. getting items) providing a read-write access to global options.
Note: unlike |:set| this provides access only to global options. You Note: unlike |:set| this provides access only to global options. You
cannot use this object to obtain or set local options' values or cannot use this object to obtain or set local options' values or
access local-only options in any fashion. Raises KeyError if no global access local-only options in any fashion. Raises KeyError if no
option with such name exists (i.e. does not raise KeyError for global option with such name exists (i.e. does not raise KeyError for
|global-local| options and global only options, but does for window- |global-local| options and global only options, but does for window-
and buffer-local ones). Use |python-buffer| objects to access to and buffer-local ones). Use |python-buffer| objects to access to
buffer-local options and |python-window| objects to access to buffer-local options and |python-window| objects to access to
@@ -303,8 +303,8 @@ Output from Python *python-output*
*python-input* *python-input*
Input (via sys.stdin, including input() and raw_input()) is not Input (via sys.stdin, including input() and raw_input()) is not
supported, and may cause the program to crash. This should probably be supported, and may cause the program to crash. This should probably
fixed. be fixed.
*python3-directory* *pythonx-directory* *python3-directory* *pythonx-directory*
Python 'runtimepath' handling *python-special-path* Python 'runtimepath' handling *python-special-path*
@@ -365,8 +365,8 @@ Implementation is similar to the following, but written in C: >python
vim.VIM_SPECIAL_PATH *python-VIM_SPECIAL_PATH* vim.VIM_SPECIAL_PATH *python-VIM_SPECIAL_PATH*
String constant used in conjunction with vim path hook. If path hook String constant used in conjunction with vim path hook. If path hook
installed by vim is requested to handle anything but path equal to installed by vim is requested to handle anything but path equal to
vim.VIM_SPECIAL_PATH constant it raises ImportError. In the only other vim.VIM_SPECIAL_PATH constant it raises ImportError. In the only
case it uses special loader. other case it uses special loader.
Note: you must not use value of this constant directly, always use Note: you must not use value of this constant directly, always use
vim.VIM_SPECIAL_PATH object. vim.VIM_SPECIAL_PATH object.
@@ -390,7 +390,8 @@ vim._get_paths *python-_get_paths*
============================================================================== ==============================================================================
Buffer objects *python-buffer* Buffer objects *python-buffer*
Buffer objects represent vim buffers. You can obtain them in a number of ways: Buffer objects represent vim buffers. You can obtain them in a number of
ways:
- via vim.current.buffer (|python-current|) - via vim.current.buffer (|python-current|)
- from indexing vim.buffers (|python-buffers|) - from indexing vim.buffers (|python-buffers|)
- from the "buffer" attribute of a window (|python-window|) - from the "buffer" attribute of a window (|python-window|)
@@ -404,9 +405,10 @@ act as if they were lists (yes, they are mutable) of strings, with each
element being a line of the buffer. All of the usual sequence operations, element being a line of the buffer. All of the usual sequence operations,
including indexing, index assignment, slicing and slice assignment, work as including indexing, index assignment, slicing and slice assignment, work as
you would expect. Note that the result of indexing (slicing) a buffer is a you would expect. Note that the result of indexing (slicing) a buffer is a
string (list of strings). This has one unusual consequence - b[:] is different string (list of strings). This has one unusual consequence - b[:] is
from b. In particular, "b[:] = None" deletes the whole of the buffer, whereas different from b. In particular, "b[:] = None" deletes the whole of the
"b = None" merely updates the variable b, with no effect on the buffer. buffer, whereas "b = None" merely updates the variable b, with no effect on
the buffer.
Buffer indexes start at zero, as is normal in Python. This differs from vim Buffer indexes start at zero, as is normal in Python. This differs from vim
line numbers, which start from 1. This is particularly relevant when dealing line numbers, which start from 1. This is particularly relevant when dealing
@@ -500,7 +502,8 @@ Example (assume r is the current range):
============================================================================== ==============================================================================
Window objects *python-window* Window objects *python-window*
Window objects represent vim windows. You can obtain them in a number of ways: Window objects represent vim windows. You can obtain them in a number of
ways:
- via vim.current.window (|python-current|) - via vim.current.window (|python-current|)
- from indexing vim.windows (|python-windows|) - from indexing vim.windows (|python-windows|)
- from indexing "windows" attribute of a tab page (|python-tabpage|) - from indexing "windows" attribute of a tab page (|python-tabpage|)

View File

@@ -56,14 +56,14 @@ To see what version of Ruby you have: >
*:rubydo* *:rubyd* *E265* *:rubydo* *:rubyd* *E265*
:[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the :[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the
[range], with $_ being set to the text of each line in [range], with $_ being set to the text of each line in
turn, without a trailing <EOL>. Setting $_ will change turn, without a trailing <EOL>. Setting $_ will
the text, but note that it is not possible to add or change the text, but note that it is not possible to
delete lines using this command. add or delete lines using this command.
The default for [range] is the whole file: "1,$". The default for [range] is the whole file: "1,$".
*:rubyfile* *:rubyf* *:rubyfile* *:rubyf*
:rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as :rubyf[ile] {file} Execute the Ruby script in {file}. This is the same
`:ruby load 'file'`, but allows file name completion. as `:ruby load 'file'`, but allows file name completion.
Executing Ruby commands is not possible in the |sandbox|. Executing Ruby commands is not possible in the |sandbox|.
@@ -127,8 +127,8 @@ Class Methods:
current Returns the current buffer object. current Returns the current buffer object.
count Returns the number of buffers. count Returns the number of buffers.
self[{n}] Returns the buffer object for the number {n}. The first number self[{n}] Returns the buffer object for the number {n}. The first
is 0. number is 0.
Methods: Methods:
@@ -157,8 +157,8 @@ Class Methods:
current Returns the current window object. current Returns the current window object.
count Returns the number of windows. count Returns the number of windows.
self[{n}] Returns the window object for the number {n}. The first number self[{n}] Returns the window object for the number {n}. The first
is 0. number is 0.
Methods: Methods:

View File

@@ -43,7 +43,8 @@ These five options control C program indenting:
'cinkeys' Specifies which keys trigger reindenting in insert mode. 'cinkeys' Specifies which keys trigger reindenting in insert mode.
'cinoptions' Sets your preferred indent style. 'cinoptions' Sets your preferred indent style.
'cinwords' Defines keywords that start an extra indent in the next line. 'cinwords' Defines keywords that start an extra indent in the next line.
'cinscopedecls' Defines strings that are recognized as a C++ scope declaration. 'cinscopedecls' Defines strings that are recognized as a C++ scope
declaration.
If 'lisp' is not on and 'equalprg' is empty, the "=" operator indents using If 'lisp' is not on and 'equalprg' is empty, the "=" operator indents using
Vim's built-in algorithm rather than calling an external program. Vim's built-in algorithm rather than calling an external program.
@@ -710,13 +711,13 @@ FORTRAN *ft-fortran-indent*
Block if, select case, select type, select rank, where, forall, type, Block if, select case, select type, select rank, where, forall, type,
interface, associate, block, enum, critical, and change team constructs are interface, associate, block, enum, critical, and change team constructs are
indented. The indenting of subroutines, functions, modules, and program blocks indented. The indenting of subroutines, functions, modules, and program
is optional. Comments, labeled statements, and continuation lines are indented blocks is optional. Comments, labeled statements, and continuation lines are
if the Fortran is in free source form, whereas they are not indented if the indented if the Fortran is in free source form, whereas they are not indented
Fortran is in fixed source form because of the left margin requirements. Hence if the Fortran is in fixed source form because of the left margin
manual indent corrections will be necessary for labeled statements and requirements. Hence manual indent corrections will be necessary for labeled
continuation lines when fixed source form is being used. For further statements and continuation lines when fixed source form is being used. For
discussion of the method used for the detection of source format see further discussion of the method used for the detection of source format see
|ft-fortran-syntax|. |ft-fortran-syntax|.
Do loops ~ Do loops ~
@@ -1018,8 +1019,8 @@ Indent after a nested paren: >
Indent for a continuation line: > Indent for a continuation line: >
let g:python_indent.continue = 'shiftwidth() * 2' let g:python_indent.continue = 'shiftwidth() * 2'
By default, the closing paren on a multiline construct lines up under the first By default, the closing paren on a multiline construct lines up under the
non-whitespace character of the previous line. first non-whitespace character of the previous line.
If you prefer that it's lined up under the first character of the line that If you prefer that it's lined up under the first character of the line that
starts the multiline construct, reset this key: > starts the multiline construct, reset this key: >
let g:python_indent.closed_paren_align_last_line = v:false let g:python_indent.closed_paren_align_last_line = v:false
@@ -1190,9 +1191,9 @@ to the vimrc file, which causes the previous alignment example to change: >
(bus_a(0) AND sig_d); (bus_a(0) AND sig_d);
Full-line comments (lines that begin with "--") are indented to be aligned with Full-line comments (lines that begin with "--") are indented to be aligned
the very previous line's comment, PROVIDED that a whitespace follows after with the very previous line's comment, PROVIDED that a whitespace follows
"--". after "--".
For example: > For example: >
@@ -1244,9 +1245,9 @@ results in: >
Notice that "--debug_code:" does not align with "-- comment 2" Notice that "--debug_code:" does not align with "-- comment 2"
because there is no whitespace that follows after "--" in "--debug_code:". because there is no whitespace that follows after "--" in "--debug_code:".
Given the dynamic nature of indenting comments, indenting should be done TWICE. Given the dynamic nature of indenting comments, indenting should be done
On the first pass, code will be indented. On the second pass, full-line TWICE. On the first pass, code will be indented. On the second pass,
comments will be indented according to the correctly indented code. full-line comments will be indented according to the correctly indented code.
VIM *ft-vim-indent* VIM *ft-vim-indent*

View File

@@ -542,9 +542,9 @@ extra spaces to get where you want to be.
*ins-smarttab* *ins-smarttab*
When the 'smarttab' option is on, the <Tab> key indents by 'shiftwidth' if the When the 'smarttab' option is on, the <Tab> key indents by 'shiftwidth' if the
cursor is in leading whitespace. The <BS> key has the opposite effect. This cursor is in leading whitespace. The <BS> key has the opposite effect. This
behaves as if 'softtabstop' were set to the value of 'shiftwidth'. This option behaves as if 'softtabstop' were set to the value of 'shiftwidth'. This
allows the user to set 'softtabstop' to a value other than 'shiftwidth' and option allows the user to set 'softtabstop' to a value other than 'shiftwidth'
still use the <Tab> key for indentation. and still use the <Tab> key for indentation.
============================================================================== ==============================================================================
5. Replace mode *Replace* *Replace-mode* *mode-replace* 5. Replace mode *Replace* *Replace-mode* *mode-replace*
@@ -644,7 +644,8 @@ not a valid CTRL-X mode command. Valid keys are the CTRL-X command itself,
CTRL-N (next), and CTRL-P (previous). CTRL-N (next), and CTRL-P (previous).
By default, the possible completions are showed in a menu and the first By default, the possible completions are showed in a menu and the first
completion is inserted into the text. This can be adjusted with 'completeopt'. completion is inserted into the text. This can be adjusted with
'completeopt'.
To get the current completion information, |complete_info()| can be used. To get the current completion information, |complete_info()| can be used.
Also see the 'infercase' option if you want to adjust the case of the match. Also see the 'infercase' option if you want to adjust the case of the match.
@@ -1119,8 +1120,8 @@ CTRL-X CTRL-Z Stop completion without changing the text.
AUTOCOMPLETION *ins-autocompletion* AUTOCOMPLETION *ins-autocompletion*
Vim can display a completion menu as you type, similar to using |i_CTRL-N|, Vim can display a completion menu as you type, similar to using |i_CTRL-N|,
but triggered automatically. See 'autocomplete'. The menu items are collected but triggered automatically. See 'autocomplete'. The menu items are
from the sources listed in the 'complete' option, in order. collected from the sources listed in the 'complete' option, in order.
A decaying timeout keeps Vim responsive. Sources earlier in the 'complete' A decaying timeout keeps Vim responsive. Sources earlier in the 'complete'
list get more time (higher priority), but all sources receive at least a small list get more time (higher priority), but all sources receive at least a small
@@ -1386,7 +1387,8 @@ any printable, non-white character:
Add this character and reduce the number of matches. Add this character and reduce the number of matches.
In all three states these can be used: In all three states these can be used:
CTRL-Y Yes: Accept the currently selected match and stop completion. CTRL-Y Yes: Accept the currently selected match and stop
completion.
CTRL-E End completion, go back to what was there before selecting a CTRL-E End completion, go back to what was there before selecting a
match (what was typed or longest common string). match (what was typed or longest common string).
<PageUp> Select a match several entries back, but don't insert it. <PageUp> Select a match several entries back, but don't insert it.
@@ -1575,11 +1577,12 @@ Exuberant ctags version 5.5.4 or newer. You can find it here:
Script completes: Script completes:
- after $ variables name - after $ variables name
- if variable was declared as object add "->", if tags file is available show - if variable was declared as object add "->", if tags file is available
name of class show name of class
- after "->" complete only function and variable names specific for given - after "->" complete only function and variable names specific for given
class. To find class location and contents tags file is required. Because class. To find class location and contents tags file is required.
PHP isn't strongly typed language user can use @var tag to declare class: > Because PHP isn't strongly typed language user can use @var tag to declare
class: >
/* @var $myVar myClass */ /* @var $myVar myClass */
$myVar-> $myVar->
@@ -1677,11 +1680,11 @@ a look at the PHP filetype to see how this works.
If you edit a file called, index.php, run the following command: > If you edit a file called, index.php, run the following command: >
syntax list syntax list
The first thing you will notice is that there are many different syntax groups. The first thing you will notice is that there are many different syntax
The PHP language can include elements from different languages like HTML, groups. The PHP language can include elements from different languages like
JavaScript and many more. The syntax plugin will only include syntax groups HTML, JavaScript and many more. The syntax plugin will only include syntax
that begin with the filetype, "php", in this case. For example these syntax groups that begin with the filetype, "php", in this case. For example these
groups are included by default with the PHP: phpEnvVar, phpIntVar, syntax groups are included by default with the PHP: phpEnvVar, phpIntVar,
phpFunctions. phpFunctions.
If you wish non-filetype syntax items to also be included, you can use a If you wish non-filetype syntax items to also be included, you can use a

View File

@@ -407,8 +407,8 @@ There are six ADDITIONAL modes. These are variants of the BASIC modes:
- Replace mode: Replace mode is a special case of Insert mode. You - Replace mode: Replace mode is a special case of Insert mode. You
can do the same things as in Insert mode, but for can do the same things as in Insert mode, but for
each character you enter, one character of the existing each character you enter, one character of the
text is deleted. See |Replace-mode|. existing text is deleted. See |Replace-mode|.
If the 'showmode' option is on "-- REPLACE --" is If the 'showmode' option is on "-- REPLACE --" is
shown at the bottom of the window. shown at the bottom of the window.

View File

@@ -1263,8 +1263,8 @@ be the user command ":Cc2" without an argument, or the command ":Cc" with
argument "2". It is advised to put a space between the command name and the argument "2". It is advised to put a space between the command name and the
argument to avoid these problems. argument to avoid these problems.
When using a user-defined command, the command can be abbreviated. However, if When using a user-defined command, the command can be abbreviated. However,
an abbreviation is not unique, an error will be issued. Furthermore, a if an abbreviation is not unique, an error will be issued. Furthermore, a
built-in command will always take precedence. built-in command will always take precedence.
Example: > Example: >
@@ -1279,8 +1279,8 @@ It is recommended that full names for user-defined commands are used in
scripts. scripts.
:com[mand] *:com* *:command* :com[mand] *:com* *:command*
List all user-defined commands. When listing commands, List all user-defined commands. When listing
the characters in the first columns are: commands, the characters in the first columns are:
! Command has the -bang attribute ! Command has the -bang attribute
" Command has the -register attribute " Command has the -register attribute
| Command has the -bar attribute | Command has the -bar attribute
@@ -1329,10 +1329,10 @@ See |:verbose-cmd| for more information.
Command attributes ~ Command attributes ~
*command-attributes* *command-attributes*
User-defined commands are treated by Nvim just like any other Ex commands. They User-defined commands are treated by Nvim just like any other Ex commands.
can have arguments, or have a range specified. Arguments are subject to They can have arguments, or have a range specified. Arguments are subject to
completion as filenames, buffers, etc. Exactly how this works depends upon the completion as filenames, buffers, etc. Exactly how this works depends upon
command's attributes, which are specified when the command is defined. the command's attributes, which are specified when the command is defined.
When defining a user command in a script, it will be able to call functions When defining a user command in a script, it will be able to call functions
local to the script and use mappings local to the script. When the user local to the script and use mappings local to the script. When the user
@@ -1440,8 +1440,8 @@ function with the following signature: >
:function {func}(ArgLead, CmdLine, CursorPos) :function {func}(ArgLead, CmdLine, CursorPos)
The function need not use all these arguments. The function should provide the The function need not use all these arguments. The function should provide
completion candidates as the return value. the completion candidates as the return value.
For the "custom" argument, the function should return the completion For the "custom" argument, the function should return the completion
candidates one per line in a newline separated string. candidates one per line in a newline separated string.
@@ -1791,9 +1791,9 @@ A more substantial example: >
:endfunction :endfunction
:command -nargs=+ -complete=command Allargs call Allargs(<q-args>) :command -nargs=+ -complete=command Allargs call Allargs(<q-args>)
The command Allargs takes any Vim command(s) as argument and executes it on all The command Allargs takes any Vim command(s) as argument and executes it on
files in the argument list. Usage example (note use of the "e" flag to ignore all files in the argument list. Usage example (note use of the "e" flag to
errors and the "update" command to write modified buffers): > ignore errors and the "update" command to write modified buffers): >
:Allargs %s/foo/bar/ge|update :Allargs %s/foo/bar/ge|update
This will invoke: > This will invoke: >
:call Allargs("%s/foo/bar/ge|update") :call Allargs("%s/foo/bar/ge|update")

View File

@@ -471,8 +471,8 @@ it to the Vim maintainer for inclusion in the distribution:
HEBREW KEYMAP *keymap-hebrew* HEBREW KEYMAP *keymap-hebrew*
This file explains what characters are available in UTF-8 and CP1255 encodings, This file explains what characters are available in UTF-8 and CP1255
and what the keymaps are to get those characters: encodings, and what the keymaps are to get those characters:
glyph encoding keymap ~ glyph encoding keymap ~
Char UTF-8 cp1255 hebrew hebrewp name ~ Char UTF-8 cp1255 hebrew hebrewp name ~

View File

@@ -859,9 +859,9 @@ buffer list. If you remove the file from the buffer list, all its marks are
lost. If you delete a line that contains a mark, that mark is erased. lost. If you delete a line that contains a mark, that mark is erased.
Lowercase marks can be used in combination with operators. For example: "d't" Lowercase marks can be used in combination with operators. For example: "d't"
deletes the lines from the cursor position to mark 't'. Hint: Use mark 't' for deletes the lines from the cursor position to mark 't'. Hint: Use mark 't'
Top, 'b' for Bottom, etc.. Lowercase marks are restored when using undo and for Top, 'b' for Bottom, etc.. Lowercase marks are restored when using undo
redo. and redo.
Uppercase marks 'A to 'Z include the file name. You can use them to jump from Uppercase marks 'A to 'Z include the file name. You can use them to jump from
file to file. You can only use an uppercase mark with an operator if the mark file to file. You can only use an uppercase mark with an operator if the mark
@@ -1149,8 +1149,8 @@ stored in the ShaDa file and restored when starting Vim.
When 'jumpoptions' option includes "stack", the jumplist behaves like the tag When 'jumpoptions' option includes "stack", the jumplist behaves like the tag
stack. When jumping to a new location from the middle of the jumplist, the stack. When jumping to a new location from the middle of the jumplist, the
locations after the current position will be discarded. With this option set locations after the current position will be discarded. With this option set
you can move through a tree of jump locations. When going back up a branch and you can move through a tree of jump locations. When going back up a branch
then down another branch, CTRL-O still takes you further up the tree. and then down another branch, CTRL-O still takes you further up the tree.
Given a jumplist like the following in which CTRL-O has been used to move back Given a jumplist like the following in which CTRL-O has been used to move back
three times to location X: > three times to location X: >
@@ -1334,7 +1334,7 @@ bring you back to the switch statement.
class. When no '}' is found before the cursor this is class. When no '}' is found before the cursor this is
an error. |exclusive| motion. an error. |exclusive| motion.
The above two commands assume that the file contains a class with methods. The above four commands assume that the file contains a class with methods.
The class definition is surrounded in '{' and '}'. Each method in the class The class definition is surrounded in '{' and '}'. Each method in the class
is also surrounded with '{' and '}'. This applies to the Java language. The is also surrounded with '{' and '}'. This applies to the Java language. The
file looks like this: > file looks like this: >
@@ -1367,7 +1367,8 @@ Using "3[m" will jump to the start of the class.
These two commands work in C programs that contain #if/#else/#endif These two commands work in C programs that contain #if/#else/#endif
constructs. It brings you to the start or end of the #if/#else/#endif where constructs. It brings you to the start or end of the #if/#else/#endif where
the current line is included. You can then use "%" to go to the matching line. the current line is included. You can then use "%" to go to the matching
line.
*[star* *[/* *[star* *[/*
[* or [/ Go to [count] previous start of a C comment "/*". [* or [/ Go to [count] previous start of a C comment "/*".

View File

@@ -1130,8 +1130,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'breakindent' 'bri' boolean (default off) 'breakindent' 'bri' boolean (default off)
local to window local to window
Every wrapped line will continue visually indented (same amount of Every wrapped line will continue visually indented (same amount of
space as the beginning of that line), thus preserving horizontal blocks space as the beginning of that line), thus preserving horizontal
of text. blocks of text.
*'breakindentopt'* *'briopt'* *'breakindentopt'* *'briopt'*
'breakindentopt' 'briopt' string (default "") 'breakindentopt' 'briopt' string (default "")
@@ -1540,12 +1540,12 @@ A jump table for the options with a short description can be found at |Q_op|.
] tag completion ] tag completion
t same as "]" t same as "]"
f scan the buffer names (as opposed to buffer contents) f scan the buffer names (as opposed to buffer contents)
F{func} call the function {func}. Multiple "F" flags may be specified. F{func} call the function {func}. Multiple "F" flags may be
Refer to |complete-functions| for details on how the function specified. Refer to |complete-functions| for details on how
is invoked and what it should return. The value can be the the function is invoked and what it should return. The value
name of a function or a |Funcref|. For |Funcref| values, can be the name of a function or a |Funcref|. For |Funcref|
spaces must be escaped with a backslash ('\'), and commas with values, spaces must be escaped with a backslash ('\'), and
double backslashes ('\\') (see |option-backslash|). commas with double backslashes ('\\') (see |option-backslash|).
Unlike other sources, functions can provide completions Unlike other sources, functions can provide completions
starting from a non-keyword character before the cursor, and starting from a non-keyword character before the cursor, and
their start position for replacing text may differ from other their start position for replacing text may differ from other
@@ -1715,7 +1715,8 @@ A jump table for the options with a short description can be found at |Q_op|.
completion in insert mode. This is useful when editing HTML tag, or completion in insert mode. This is useful when editing HTML tag, or
Makefile with 'noshellslash' on MS-Windows. Makefile with 'noshellslash' on MS-Windows.
- When this option is set to "backslash", backslash is used. This is - When this option is set to "backslash", backslash is used. This is
useful when editing a batch file with 'shellslash' set on MS-Windows. useful when editing a batch file with 'shellslash' set on
MS-Windows.
- When this option is empty, same character is used as for - When this option is empty, same character is used as for
'shellslash'. 'shellslash'.
For Insert mode completion the buffer-local value is used. For For Insert mode completion the buffer-local value is used. For
@@ -3178,7 +3179,6 @@ A jump table for the options with a short description can be found at |Q_op|.
modeline, see |sandbox-option|. That stops the option from working, modeline, see |sandbox-option|. That stops the option from working,
since changing the buffer text is not allowed. since changing the buffer text is not allowed.
This option cannot be set in a modeline when 'modelineexpr' is off. This option cannot be set in a modeline when 'modelineexpr' is off.
NOTE: This option is set to "" when 'compatible' is set.
*'formatlistpat'* *'flp'* *'formatlistpat'* *'flp'*
'formatlistpat' 'flp' string (default "^\s*\d\+[\]:.)}\t ]\s*") 'formatlistpat' 'flp' string (default "^\s*\d\+[\]:.)}\t ]\s*")
@@ -4023,9 +4023,9 @@ A jump table for the options with a short description can be found at |Q_op|.
*'langremap'* *'lrm'* *'nolangremap'* *'nolrm'* *'langremap'* *'lrm'* *'nolangremap'* *'nolrm'*
'langremap' 'lrm' boolean (default off) 'langremap' 'lrm' boolean (default off)
global global
When off, setting 'langmap' does not apply to characters resulting from When off, setting 'langmap' does not apply to characters resulting
a mapping. If setting 'langmap' disables some of your mappings, make from a mapping. If setting 'langmap' disables some of your mappings,
sure this option is off. make sure this option is off.
*'laststatus'* *'ls'* *'laststatus'* *'ls'*
'laststatus' 'ls' number (default 2) 'laststatus' 'ls' number (default 2)
@@ -4046,8 +4046,8 @@ A jump table for the options with a short description can be found at |Q_op|.
executing macros, registers and other commands that have not been executing macros, registers and other commands that have not been
typed. Also, updating the window title is postponed. To force an typed. Also, updating the window title is postponed. To force an
update use |:redraw|. update use |:redraw|.
This may occasionally cause display errors. It is only meant to be set This may occasionally cause display errors. It is only meant to be
temporarily when performing an operation where redrawing may cause set temporarily when performing an operation where redrawing may cause
flickering or cause a slowdown. flickering or cause a slowdown.
*'lhistory'* *'lhi'* *'lhistory'* *'lhi'*
@@ -6026,9 +6026,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with 'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with
different values, you might consider setting 'smarttab'. different values, you might consider setting 'smarttab'.
'softtabstop' is temporarily set to 0 when 'paste' is on and reset
when it is turned off. It is also reset when 'compatible' is set.
The 'L' flag in 'cpoptions' alters tab behavior when 'list' is The 'L' flag in 'cpoptions' alters tab behavior when 'list' is
enabled. See also |ins-expandtab| ans user manual section |30.5| for enabled. See also |ins-expandtab| ans user manual section |30.5| for
in-depth explanations. in-depth explanations.

View File

@@ -66,9 +66,9 @@ path.
Nvim will also load ftdetect files, if there are any. Nvim will also load ftdetect files, if there are any.
Note that the files under "pack/foo/opt" are not loaded automatically, only the Note that the files under "pack/foo/opt" are not loaded automatically, only
ones under "pack/foo/start". See |pack-add| below for how the "opt" directory the ones under "pack/foo/start". See |pack-add| below for how the "opt"
is used. directory is used.
Loading packages automatically will not happen if loading plugins is disabled, Loading packages automatically will not happen if loading plugins is disabled,
see |load-plugins|. see |load-plugins|.
@@ -145,8 +145,8 @@ This assumes you write one or more plugins that you distribute as a package.
If you have two unrelated plugins you would use two packages, so that Vim If you have two unrelated plugins you would use two packages, so that Vim
users can choose what they include or not. Or you can decide to use one users can choose what they include or not. Or you can decide to use one
package with optional plugins, and tell the user to add the preferred ones with package with optional plugins, and tell the user to add the preferred ones
`:packadd`. with `:packadd`.
Decide how you want to distribute the package. You can create an archive or Decide how you want to distribute the package. You can create an archive or
you could use a repository. An archive can be used by more users, but is a you could use a repository. An archive can be used by more users, but is a

View File

@@ -274,9 +274,9 @@ When searching backwards, searching starts at the start of the line, using the
cursor position is used. cursor position is used.
In Vi the ":tag" command sets the last search pattern when the tag is searched In Vi the ":tag" command sets the last search pattern when the tag is searched
for. In Vim this is not done, the previous search pattern is still remembered, for. In Vim this is not done, the previous search pattern is still
unless the 't' flag is present in 'cpoptions'. The search pattern is always remembered, unless the 't' flag is present in 'cpoptions'. The search pattern
put in the search history. is always put in the search history.
If the 'wrapscan' option is on (which is the default), searches wrap around If the 'wrapscan' option is on (which is the default), searches wrap around
the end of the buffer. If 'wrapscan' is not set, the backward search stops the end of the buffer. If 'wrapscan' is not set, the backward search stops
@@ -1134,11 +1134,12 @@ x A single character, with no special meaning, matches itself
in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'. in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
- If two characters in the sequence are separated by '-', this is - If two characters in the sequence are separated by '-', this is
shorthand for the full list of ASCII characters between them. E.g., shorthand for the full list of ASCII characters between them. E.g.,
"[0-9]" matches any decimal digit. If the starting character exceeds "[0-9]" matches any decimal digit. If the starting character
the ending character, e.g. [c-a], E944 occurs. Non-ASCII characters exceeds the ending character, e.g. [c-a], E944 occurs. Non-ASCII
can be used, but the character values must not be more than 256 apart characters can be used, but the character values must not be more
in the old regexp engine. For example, searching by [\u3000-\u4000] than 256 apart in the old regexp engine. For example, searching by
after setting re=1 emits a E945 error. Prepending \%#=2 will fix it. [\u3000-\u4000] after setting re=1 emits a E945 error. Prepending
\%#=2 will fix it.
- A character class expression is evaluated to the set of characters - A character class expression is evaluated to the set of characters
belonging to that character class. The following character classes belonging to that character class. The following character classes
are supported: are supported:

View File

@@ -75,9 +75,9 @@ processing a quickfix or location list command, it will be aborted.
*:cc* *:cc*
:cc[!] [nr] Display error [nr]. If [nr] is omitted, the same :cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
:[nr]cc[!] error is displayed again. Without [!] this doesn't :[nr]cc[!] error is displayed again. Without [!] this doesn't
work when jumping to another buffer, the current buffer work when jumping to another buffer, the current
has been changed, there is the only window for the buffer has been changed, there is the only window for
buffer and both 'hidden' and 'autowrite' are off. the buffer and both 'hidden' and 'autowrite' are off.
When jumping to another buffer with [!] any changes to When jumping to another buffer with [!] any changes to
the current buffer are lost, unless 'hidden' is set or the current buffer are lost, unless 'hidden' is set or
there is another window for this buffer. there is another window for this buffer.
@@ -131,10 +131,10 @@ processing a quickfix or location list command, it will be aborted.
used. If there are no errors, then an error message used. If there are no errors, then an error message
is displayed. Assumes that the entries in a quickfix is displayed. Assumes that the entries in a quickfix
list are sorted by their buffer number and line list are sorted by their buffer number and line
number. If there are multiple errors on the same line, number. If there are multiple errors on the same
then only the first entry is used. If [count] exceeds line, then only the first entry is used. If [count]
the number of entries above the current line, then the exceeds the number of entries above the current line,
first error in the file is selected. then the first error in the file is selected.
*:lab* *:labove* *:lab* *:labove*
:[count]lab[ove] Same as ":cabove", except the location list for the :[count]lab[ove] Same as ":cabove", except the location list for the
@@ -392,9 +392,10 @@ processing a quickfix or location list command, it will be aborted.
*:cl* *:clist* *:cl* *:clist*
:cl[ist] [from] [, [to]] :cl[ist] [from] [, [to]]
List all errors that are valid |quickfix-valid|. List all errors that are valid |quickfix-valid|.
If numbers [from] and/or [to] are given, the respective If numbers [from] and/or [to] are given, the
range of errors is listed. A negative number counts respective range of errors is listed. A negative
from the last error backwards, -1 being the last error. number counts from the last error backwards, -1 being
the last error.
The |:filter| command can be used to display only the The |:filter| command can be used to display only the
quickfix entries matching a supplied pattern. The quickfix entries matching a supplied pattern. The
pattern is matched against the filename, module name, pattern is matched against the filename, module name,
@@ -1205,8 +1206,8 @@ arguments to :grep are passed straight to the "grep" program, so you can use
whatever options your "grep" supports. whatever options your "grep" supports.
By default, :grep invokes grep with the -n option (show file and line By default, :grep invokes grep with the -n option (show file and line
numbers). You can change this with the 'grepprg' option. You will need to set numbers). You can change this with the 'grepprg' option. You will need to
'grepprg' if: set 'grepprg' if:
a) You are using a program that isn't called "grep" a) You are using a program that isn't called "grep"
b) You have to call grep with a full path b) You have to call grep with a full path
@@ -1334,8 +1335,9 @@ The .NET CLI compiler outputs both errors and warnings by default. The output
may be limited to include only errors, by setting the g:dotnet_errors_only may be limited to include only errors, by setting the g:dotnet_errors_only
variable to |v:true|. variable to |v:true|.
The associated project name is included in each error and warning. To suppress The associated project name is included in each error and warning. To
the project name, set the g:dotnet_show_project_file variable to |v:false|. suppress the project name, set the g:dotnet_show_project_file variable to
|v:false|.
Example: limit output to only display errors, and suppress the project name: > Example: limit output to only display errors, and suppress the project name: >
let dotnet_errors_only = v:true let dotnet_errors_only = v:true
@@ -1687,8 +1689,8 @@ Included in the distribution compiler for TeX ($VIMRUNTIME/compiler/tex.vim)
uses make command if possible. If the compiler finds a file named "Makefile" uses make command if possible. If the compiler finds a file named "Makefile"
or "makefile" in the current directory, it supposes that you want to process or "makefile" in the current directory, it supposes that you want to process
your `*TeX` files with make, and the makefile does the right work. In this case your `*TeX` files with make, and the makefile does the right work. In this case
compiler sets 'errorformat' for `*TeX` output and leaves 'makeprg' untouched. If compiler sets 'errorformat' for `*TeX` output and leaves 'makeprg' untouched.
neither "Makefile" nor "makefile" is found, the compiler will not use make. If neither "Makefile" nor "makefile" is found, the compiler will not use make.
You can force the compiler to ignore makefiles by defining You can force the compiler to ignore makefiles by defining
b:tex_ignore_makefile or g:tex_ignore_makefile variable (they are checked for b:tex_ignore_makefile or g:tex_ignore_makefile variable (they are checked for
existence only). existence only).
@@ -1733,8 +1735,8 @@ automatically in Typst buffers by the Typst filetype plugin |ft-typst-plugin|.
Run |:make| to compile the current Typst file. Run |:make| to compile the current Typst file.
*g:typst_cmd* *g:typst_cmd*
By default Vim will use "typst" as the command to run the Typst compiler. This By default Vim will use "typst" as the command to run the Typst compiler.
can be changed by setting the |g:typst_cmd| variable: > This can be changed by setting the |g:typst_cmd| variable: >
let g:typst_cmd = "/path/to/other/command" let g:typst_cmd = "/path/to/other/command"
============================================================================= =============================================================================
@@ -1821,11 +1823,11 @@ or >
to indicate the column of the error. This is to be used in a multi-line error to indicate the column of the error. This is to be used in a multi-line error
message. See |errorformat-javac| for a useful example. message. See |errorformat-javac| for a useful example.
The "%s" conversion specifies the text to search for, to locate the error line. The "%s" conversion specifies the text to search for, to locate the error
The text is used as a literal string. The anchors "^" and "$" are added to line. The text is used as a literal string. The anchors "^" and "$" are
the text to locate the error line exactly matching the search text and the added to the text to locate the error line exactly matching the search text
text is prefixed with the "\V" atom to make it "very nomagic". The "%s" and the text is prefixed with the "\V" atom to make it "very nomagic". The
conversion can be used to locate lines without a line number in the error "%s" conversion can be used to locate lines without a line number in the error
output. Like the output of the "grep" shell command. output. Like the output of the "grep" shell command.
When the pattern is present the line number will not be used. When the pattern is present the line number will not be used.
@@ -2017,7 +2019,8 @@ be escaped), meta symbols have to be written with leading '%':
%~ The single '~' character. %~ The single '~' character.
When using character classes in expressions (see |/\i| for an overview), When using character classes in expressions (see |/\i| for an overview),
terms containing the "\+" quantifier can be written in the scanf() "%*" terms containing the "\+" quantifier can be written in the scanf() "%*"
notation. Example: "%\\d%\\+" ("\d\+", "any number") is equivalent to "%*\\d". notation. Example: "%\\d%\\+" ("\d\+", "any number") is equivalent to
"%*\\d".
Important note: The \(...\) grouping of sub-matches can not be used in format Important note: The \(...\) grouping of sub-matches can not be used in format
specifications because it is reserved for internal conversions. specifications because it is reserved for internal conversions.
@@ -2349,8 +2352,8 @@ For example, if only the filename is present for a quickfix entry, then the
two "|" field separator characters after the filename are not needed. Another two "|" field separator characters after the filename are not needed. Another
use case is to customize the path displayed for a filename. By default, the use case is to customize the path displayed for a filename. By default, the
complete path (which may be too long) is displayed for files which are not complete path (which may be too long) is displayed for files which are not
under the current directory tree. The file path may need to be simplified to a under the current directory tree. The file path may need to be simplified to
common parent directory. a common parent directory.
The displayed text can be customized by setting the 'quickfixtextfunc' option The displayed text can be customized by setting the 'quickfixtextfunc' option
to a Vim function. This function will be called with a dict argument and to a Vim function. This function will be called with a dict argument and

View File

@@ -163,11 +163,11 @@ Q Repeat the last recorded register [count] times.
See |visual-repeat|, |default-mappings|. See |visual-repeat|, |default-mappings|.
*:@* *:@*
:[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an Ex :[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an
command. First set cursor at line [addr] (default is Ex command. First set cursor at line [addr] (default
current line). When the last line in the register does is current line). When the last line in the register
not have a <CR> it will be added automatically when does not have a <CR> it will be added automatically
the 'e' flag is present in 'cpoptions'. when the 'e' flag is present in 'cpoptions'.
For ":@=" the last used expression is used. The For ":@=" the last used expression is used. The
result of evaluating the expression is executed as an result of evaluating the expression is executed as an
Ex command. Ex command.

View File

@@ -55,8 +55,8 @@ identifier is used to jump to the sign or to remove the sign. The identifier
is assigned when placing the sign using the |:sign-place| command or the is assigned when placing the sign using the |:sign-place| command or the
|sign_place()| function. Each sign identifier should be a unique number (per |sign_place()| function. Each sign identifier should be a unique number (per
buffer). Placing the same identifier twice will move the previously placed buffer). Placing the same identifier twice will move the previously placed
sign. The |sign_place()| function can be called with a zero sign identifier to sign. The |sign_place()| function can be called with a zero sign identifier
allocate the next available identifier. to allocate the next available identifier.
*sign-group* *sign-group*
Each placed sign can be assigned to either the global group or a named group. Each placed sign can be assigned to either the global group or a named group.
@@ -188,8 +188,8 @@ See |sign_place()| for the equivalent Vim script function.
By default, the sign is placed in the global sign group. By default, the sign is placed in the global sign group.
By default, the sign is assigned a default priority of 10, By default, the sign is assigned a default priority of 10,
unless specified otherwise by the sign definition. To assign a unless specified otherwise by the sign definition. To assign
different priority value, use "priority={prio}" to specify a a different priority value, use "priority={prio}" to specify a
value. The priority is used to determine the sign that is value. The priority is used to determine the sign that is
displayed when multiple signs are placed on the same line. displayed when multiple signs are placed on the same line.
@@ -287,7 +287,8 @@ See |sign_unplace()| for the equivalent Vim script function.
all the files it appears in. all the files it appears in.
:sig[n] unplace * :sig[n] unplace *
Remove all placed signs in the global group from all the files. Remove all placed signs in the global group from all the
files.
:sig[n] unplace * group={group} :sig[n] unplace * group={group}
Remove all placed signs in group {group} from all the files. Remove all placed signs in group {group} from all the files.
@@ -296,8 +297,8 @@ See |sign_unplace()| for the equivalent Vim script function.
Remove all placed signs in all the groups from all the files. Remove all placed signs in all the groups from all the files.
:sig[n] unplace :sig[n] unplace
Remove a placed sign at the cursor position. If multiple signs Remove a placed sign at the cursor position. If multiple
are placed in the line, then only one is removed. signs are placed in the line, then only one is removed.
:sig[n] unplace group={group} :sig[n] unplace group={group}
Remove a placed sign in group {group} at the cursor Remove a placed sign in group {group} at the cursor

View File

@@ -826,8 +826,8 @@ starting with an upper-case letter.
When the word includes an upper-case letter, this means the upper-case letter When the word includes an upper-case letter, this means the upper-case letter
is required at this position. The same word with a lower-case letter at this is required at this position. The same word with a lower-case letter at this
position will not match. When some of the other letters are upper-case it will position will not match. When some of the other letters are upper-case it
not match either. will not match either.
The word with all upper-case characters will always be OK, The word with all upper-case characters will always be OK,
@@ -1166,9 +1166,10 @@ WORDS WITH A SLASH *spell-SLASH*
The slash is used in the .dic file to separate the basic word from the affix The slash is used in the .dic file to separate the basic word from the affix
letters and other flags. Unfortunately, this means you cannot use a slash in letters and other flags. Unfortunately, this means you cannot use a slash in
a word. Thus "TCP/IP" is not a word but "TCP" with the flags "IP". To include a word. Thus "TCP/IP" is not a word but "TCP" with the flags "IP". To
a slash in the word put a backslash before it: "TCP\/IP". In the rare case include a slash in the word put a backslash before it: "TCP\/IP". In the rare
you want to use a backslash inside a word you need to use two backslashes. case you want to use a backslash inside a word you need to use two
backslashes.
Any other use of the backslash is reserved for future expansion. Any other use of the backslash is reserved for future expansion.

View File

@@ -997,8 +997,8 @@ has marks for.
*shada-file-marks* *shada-file-marks*
Uppercase marks ('A to 'Z) are stored when writing the ShaDa file. The Uppercase marks ('A to 'Z) are stored when writing the ShaDa file. The
numbered marks ('0 to '9) are a bit special. When the ShaDa file is written numbered marks ('0 to '9) are a bit special. When the ShaDa file is written
(when exiting or with the |:wshada| command), '0 is set to the current cursor (when exiting or with the |:wshada| command), '0 is set to the current
position and file. The old '0 is moved to '1, '1 to '2, etc. This cursor position and file. The old '0 is moved to '1, '1 to '2, etc. This
resembles what happens with the "1 to "9 delete registers. If the current resembles what happens with the "1 to "9 delete registers. If the current
cursor position is already present in '0 to '9, it is moved to '0, to avoid cursor position is already present in '0 to '9, it is moved to '0, to avoid
having the same position twice. The result is that with "'0", you can jump having the same position twice. The result is that with "'0", you can jump

View File

@@ -397,9 +397,9 @@ version 2.2.3.
ASSEMBLY *asm68k* *ft-asm-syntax* *ft-asmh8300-syntax* *ft-nasm-syntax* ASSEMBLY *asm68k* *ft-asm-syntax* *ft-asmh8300-syntax* *ft-nasm-syntax*
*ft-masm-syntax* *ft-asm68k-syntax* *ft-masm-syntax* *ft-asm68k-syntax*
Files matching "*.i" could be Progress or Assembly. If the automatic detection Files matching "*.i" could be Progress or Assembly. If the automatic
doesn't work for you, or you don't edit Progress at all, use this in your detection doesn't work for you, or you don't edit Progress at all, use this in
startup vimrc: > your startup vimrc: >
:let filetype_i = "asm" :let filetype_i = "asm"
Replace "asm" with the type of assembly you use. Replace "asm" with the type of assembly you use.
@@ -507,8 +507,8 @@ or for Xorg colors (e.g: AliceBlue): >
BAAN *baan-syntax* BAAN *baan-syntax*
The baan.vim gives syntax support for BaanC of release BaanIV up to SSA ERP LN The baan.vim gives syntax support for BaanC of release BaanIV up to SSA ERP LN
for both 3 GL and 4 GL programming. Large number of standard defines/constants for both 3 GL and 4 GL programming. Large number of standard
are supported. defines/constants are supported.
Some special violation of coding standards will be signalled when one specify Some special violation of coding standards will be signalled when one specify
in ones |init.vim|: > in ones |init.vim|: >
@@ -804,10 +804,10 @@ Now the syntax engine should determine the newly changed CSV delimiter.
CYNLIB *ft-cynlib-syntax* CYNLIB *ft-cynlib-syntax*
Cynlib files are C++ files that use the Cynlib class library to enable Cynlib files are C++ files that use the Cynlib class library to enable
hardware modelling and simulation using C++. Typically Cynlib files have a .cc hardware modelling and simulation using C++. Typically Cynlib files have a
or a .cpp extension, which makes it very difficult to distinguish them from a .cc or a .cpp extension, which makes it very difficult to distinguish them
normal C++ file. Thus, to enable Cynlib highlighting for .cc files, add this from a normal C++ file. Thus, to enable Cynlib highlighting for .cc files,
line to your vimrc file: > add this line to your vimrc file: >
:let cynlib_cyntax_for_cc=1 :let cynlib_cyntax_for_cc=1
@@ -847,9 +847,9 @@ following variables:
DART *ft-dart-syntax* DART *ft-dart-syntax*
Dart is an object-oriented, typed, class defined, garbage collected language Dart is an object-oriented, typed, class defined, garbage collected language
used for developing mobile, desktop, web, and back-end applications. Dart uses used for developing mobile, desktop, web, and back-end applications. Dart
a C-like syntax derived from C, Java, and JavaScript, with features adopted uses a C-like syntax derived from C, Java, and JavaScript, with features
from Smalltalk, Python, Ruby, and others. adopted from Smalltalk, Python, Ruby, and others.
More information about the language and its development environment at the More information about the language and its development environment at the
official Dart language website at https://dart.dev official Dart language website at https://dart.dev
@@ -1320,8 +1320,8 @@ fortran_fold in your .vimrc with a command such as >
to instruct the syntax script to define fold regions for program units, that to instruct the syntax script to define fold regions for program units, that
is main programs starting with a program statement, subroutines, function is main programs starting with a program statement, subroutines, function
subprograms, modules, submodules, blocks of comment lines, and block data subprograms, modules, submodules, blocks of comment lines, and block data
units. Block, interface, associate, critical, type definition, and change team units. Block, interface, associate, critical, type definition, and change
constructs will also be folded. If you also set the variable team constructs will also be folded. If you also set the variable
fortran_fold_conditionals with a command such as > fortran_fold_conditionals with a command such as >
:let fortran_fold_conditionals=1 :let fortran_fold_conditionals=1
then fold regions will also be defined for do loops, if blocks, select case, then fold regions will also be defined for do loops, if blocks, select case,
@@ -1966,9 +1966,9 @@ these versions using the global variables |g:lua_version| and
MAIL *ft-mail.vim* MAIL *ft-mail.vim*
Vim highlights all the standard elements of an email (headers, signatures, Vim highlights all the standard elements of an email (headers, signatures,
quoted text and URLs / email addresses). In keeping with standard conventions, quoted text and URLs / email addresses). In keeping with standard
signatures begin in a line containing only "--" followed optionally by conventions, signatures begin in a line containing only "--" followed
whitespaces and end with a newline. optionally by whitespaces and end with a newline.
Vim treats lines beginning with "]", "}", "|", ">" or a word followed by ">" Vim treats lines beginning with "]", "}", "|", ">" or a word followed by ">"
as quoted text. However Vim highlights headers and signatures in quoted text as quoted text. However Vim highlights headers and signatures in quoted text
@@ -2009,8 +2009,9 @@ MAPLE *ft-maple-syntax*
Maple V, by Waterloo Maple Inc, supports symbolic algebra. The language Maple V, by Waterloo Maple Inc, supports symbolic algebra. The language
supports many packages of functions which are selectively loaded by the user. supports many packages of functions which are selectively loaded by the user.
The standard set of packages' functions as supplied in Maple V release 4 may be The standard set of packages' functions as supplied in Maple V release 4 may
highlighted at the user's discretion. Users may place in their vimrc file: > be highlighted at the user's discretion. Users may place in their vimrc
file: >
:let mvpkg_all= 1 :let mvpkg_all= 1
@@ -2332,8 +2333,8 @@ This is a list of the rules which can be used here:
- inlinecode - inlinecode
- inlinemath - inlinemath
You can customize the way concealing works. For example, if you prefer to mark You can customize the way concealing works. For example, if you prefer to
footnotes with the `*` symbol: > mark footnotes with the `*` symbol: >
:let g:pandoc#syntax#conceal#cchar_overrides = {"footnote" : "*"} :let g:pandoc#syntax#conceal#cchar_overrides = {"footnote" : "*"}
@@ -2369,8 +2370,8 @@ To add underline subscript, superscript and strikeout text styles. Default = 1 >
:let g:pandoc#syntax#style#underline_special = 1 :let g:pandoc#syntax#style#underline_special = 1
Detect and highlight definition lists. Disabling this can improve performance. Detect and highlight definition lists. Disabling this can improve
Default = 1 (i.e., enabled by default) > performance. Default = 1 (i.e., enabled by default) >
:let g:pandoc#syntax#style#use_definition_lists = 1 :let g:pandoc#syntax#style#use_definition_lists = 1
@@ -2844,8 +2845,8 @@ RASI *ft-rasi-syntax*
Rasi stands for Rofi Advanced Style Information. It is used by the program Rasi stands for Rofi Advanced Style Information. It is used by the program
rofi to style the rendering of the search window. The language is heavily rofi to style the rendering of the search window. The language is heavily
inspired by CSS stylesheet. Files with the following extensions are recognized inspired by CSS stylesheet. Files with the following extensions are
as rasi files: .rasi. recognized as rasi files: .rasi.
READLINE *ft-readline-syntax* READLINE *ft-readline-syntax*
@@ -3554,7 +3555,8 @@ syntax highlighting script handles this with the following logic:
< If you don't want matching to occur inside bold and italicized < If you don't want matching to occur inside bold and italicized
regions, > regions, >
let g:tex_excludematcher= 1 let g:tex_excludematcher= 1
< will prevent the texMatcher group from being included in those regions. < will prevent the texMatcher group from being included in those
regions.
TF *ft-tf-syntax* TF *ft-tf-syntax*
@@ -3640,8 +3642,8 @@ highlighting is to put the following line in your |vimrc|: >
WDL *wdl-syntax* WDL *wdl-syntax*
The Workflow Description Language is a way to specify data processing workflows The Workflow Description Language is a way to specify data processing
with a human-readable and writeable syntax. This is used a lot in workflows with a human-readable and writeable syntax. This is used a lot in
bioinformatics. More info on the spec can be found here: bioinformatics. More info on the spec can be found here:
https://github.com/openwdl/wdl https://github.com/openwdl/wdl

View File

@@ -466,8 +466,8 @@ would otherwise go unnoticed. Example: >
:$d|/tag-function-name/ :$d|/tag-function-name/
In Vi the ":tag" command sets the last search pattern when the tag is searched In Vi the ":tag" command sets the last search pattern when the tag is searched
for. In Vim this is not done, the previous search pattern is still remembered, for. In Vim this is not done, the previous search pattern is still
unless the 't' flag is present in 'cpoptions'. remembered, unless the 't' flag is present in 'cpoptions'.
*tags-option* *tags-option*
The 'tags' option is a list of file names. Each of these files is searched The 'tags' option is a list of file names. Each of these files is searched
@@ -942,7 +942,8 @@ The function should return a List of Dict entries. Each Dict must at least
include the following entries and each value must be a string: include the following entries and each value must be a string:
name Name of the tag. name Name of the tag.
filename Name of the file where the tag is defined. It is filename Name of the file where the tag is defined. It is
either relative to the current directory or a full path. either relative to the current directory or a full
path.
cmd Ex command used to locate the tag in the file. This cmd Ex command used to locate the tag in the file. This
can be either an Ex search pattern or a line number. can be either an Ex search pattern or a line number.
Note that the format is similar to that of |taglist()|, which makes it possible Note that the format is similar to that of |taglist()|, which makes it possible

View File

@@ -658,8 +658,8 @@ If there is no g:termdebug_config you can use: >vim
Change default signs ~ Change default signs ~
*termdebug_signs* *termdebug_signs*
Termdebug uses the hex number of the breakpoint ID in the signcolumn to Termdebug uses the hex number of the breakpoint ID in the signcolumn to
represent breakpoints. If it is greater than "0xFF", then it will be displayed represent breakpoints. If it is greater than "0xFF", then it will be
as "F+", due to we really only have two screen cells for the sign. displayed as "F+", due to we really only have two screen cells for the sign.
You may also use decimal breakpoint signs instead, in which case IDs greater You may also use decimal breakpoint signs instead, in which case IDs greater
than 99 will be displayed as "9+". than 99 will be displayed as "9+".

View File

@@ -116,10 +116,10 @@ To make this easier, you could use these mappings: >
You then lose the ability to copy text from the line above/below the cursor You then lose the ability to copy text from the line above/below the cursor
|i_CTRL-E|. |i_CTRL-E|.
Also consider setting 'scrolloff' to a larger value, so that you can always see Also consider setting 'scrolloff' to a larger value, so that you can always
some context around the cursor. If 'scrolloff' is bigger than half the window see some context around the cursor. If 'scrolloff' is bigger than half the
height, the cursor will always be in the middle and the text is scrolled when window height, the cursor will always be in the middle and the text is
the cursor is moved up/down. scrolled when the cursor is moved up/down.
============================================================================== ==============================================================================
Smooth scrolling *scroll-smooth* Smooth scrolling *scroll-smooth*

View File

@@ -370,11 +370,12 @@ information you can use these commands: >
Note use of `&l:undolevels` to explicitly read the local value of 'undolevels' Note use of `&l:undolevels` to explicitly read the local value of 'undolevels'
and the use of `:setlocal` to change only the local option (which takes and the use of `:setlocal` to change only the local option (which takes
precedence over the corresponding global option value). Saving the option value precedence over the corresponding global option value). Saving the option
via the use of `&undolevels` is unpredictable; it reads either the local value value via the use of `&undolevels` is unpredictable; it reads either the local
(if one has been set) or the global value (otherwise). Also, if a local value value (if one has been set) or the global value (otherwise). Also, if a local
has been set, changing the option via `:set undolevels` will change both the value has been set, changing the option via `:set undolevels` will change both
global and local values, requiring extra work to save and restore both values. the global and local values, requiring extra work to save and restore both
values.
Marks for the buffer ('a to 'z) are also saved and restored, together with the Marks for the buffer ('a to 'z) are also saved and restored, together with the
text. text.

View File

@@ -408,9 +408,10 @@ gx Opens the current filepath or URL (decided by
< If the [!] is given, restrict the output of {command} < If the [!] is given, restrict the output of {command}
to lines that do NOT match {pattern}. to lines that do NOT match {pattern}.
{pattern} is a Vim search pattern. Instead of enclosing {pattern} is a Vim search pattern. Instead of
it in / any non-ID character (see 'isident') can be enclosing it in / any non-ID character (see 'isident')
used, so long as it does not appear in {pattern}. can be used, so long as it does not appear in
{pattern}.
Without the enclosing character the pattern cannot Without the enclosing character the pattern cannot
include the bar character. 'ignorecase' is not used. include the bar character. 'ignorecase' is not used.

View File

@@ -79,7 +79,8 @@ Multiple windows and buffers. |windows.txt|
is called a hidden buffer. Many commands and options have been added is called a hidden buffer. Many commands and options have been added
for this facility. for this facility.
Vim can also use multiple tab pages, each with one or more windows. A Vim can also use multiple tab pages, each with one or more windows. A
line with tab labels can be used to quickly switch between these pages. line with tab labels can be used to quickly switch between these
pages.
|tab-page| |tab-page|
Syntax highlighting. |:syntax| Syntax highlighting. |:syntax|

View File

@@ -1416,8 +1416,8 @@ A string constant accepts these special characters:
Don't use <Char-xxxx> to get a UTF-8 character, use \uxxxx as Don't use <Char-xxxx> to get a UTF-8 character, use \uxxxx as
mentioned above. mentioned above.
\<*xxx> Like \<xxx> but prepends a modifier instead of including it in the \<*xxx> Like \<xxx> but prepends a modifier instead of including it in the
character. E.g. "\<C-w>" is one character 0x17 while "\<*C-w>" is four character. E.g. "\<C-w>" is one character 0x17 while "\<*C-w>" is
bytes: 3 for the CTRL modifier and then character "W". four bytes: 3 for the CTRL modifier and then character "W".
Note that "\xff" is stored as the byte 255, which may be invalid in some Note that "\xff" is stored as the byte 255, which may be invalid in some
encodings. Use "\u00ff" to store character 255 correctly as UTF-8. encodings. Use "\u00ff" to store character 255 correctly as UTF-8.
@@ -2049,7 +2049,8 @@ text...
END END
< There can be multiple Vim expressions in a single line < There can be multiple Vim expressions in a single line
but an expression cannot span multiple lines. If any but an expression cannot span multiple lines. If any
expression evaluation fails, then the assignment fails. expression evaluation fails, then the assignment
fails.
{endmarker} must not contain white space. {endmarker} must not contain white space.
{endmarker} cannot start with a lower case character. {endmarker} cannot start with a lower case character.

View File

@@ -690,7 +690,11 @@ bufnr([{buf} [, {create}]]) *bufnr()*
above. above.
If the buffer doesn't exist, -1 is returned. Or, if the If the buffer doesn't exist, -1 is returned. Or, if the
{create} argument is present and TRUE, a new, unlisted, {create} argument is present and TRUE, a new, unlisted,
buffer is created and its number is returned. buffer is created and its number is returned. Example: >vim
let newbuf = bufnr('Scratch001', 1)
< Using an empty name uses the current buffer. To create a new
buffer with an empty name use |bufadd()|.
bufnr("$") is the last buffer: >vim bufnr("$") is the last buffer: >vim
let last_buffer = bufnr("$") let last_buffer = bufnr("$")
< The result is a Number, which is the highest buffer number < The result is a Number, which is the highest buffer number
@@ -1139,10 +1143,11 @@ col({expr} [, {winid}]) *col()*
(`integer`) (`integer`)
complete({startcol}, {matches}) *complete()* *E785* complete({startcol}, {matches}) *complete()* *E785*
Set the matches for Insert mode completion. Set the matches for Insert mode completion. Can only be used
Can only be used in Insert mode. You need to use a mapping in Insert mode. Typically invoked from a mapping with
with CTRL-R = (see |i_CTRL-R|). It does not work after CTRL-O CTRL-R = (see |i_CTRL-R|), but may also be called from a
or with an expression mapping. |<Cmd>| mapping. It does not work after CTRL-O or with an
expression mapping.
{startcol} is the byte offset in the line where the completed {startcol} is the byte offset in the line where the completed
text start. The text up to the cursor is the original text text start. The text up to the cursor is the original text
that will be replaced by the matches. Use col('.') for an that will be replaced by the matches. Use col('.') for an
@@ -1208,7 +1213,8 @@ complete_info([{what}]) *complete_info()*
See |pumvisible()|. See |pumvisible()|.
items List of all completion candidates. Each item items List of all completion candidates. Each item
is a dictionary containing the entries "word", is a dictionary containing the entries "word",
"abbr", "menu", "kind", "info" and "user_data". "abbr", "menu", "kind", "info" and
"user_data".
See |complete-items|. See |complete-items|.
matches Same as "items", but only returns items that matches Same as "items", but only returns items that
are matching current query. If both "matches" are matching current query. If both "matches"
@@ -2436,8 +2442,8 @@ filter({expr1}, {expr2}) *filter()*
or a new |Blob| or |String|. or a new |Blob| or |String|.
When an error is encountered while evaluating {expr2} no When an error is encountered while evaluating {expr2} no
further items in {expr1} are processed. further items in {expr1} are processed.
When {expr2} is a Funcref errors inside a function are ignored, When {expr2} is a Funcref errors inside a function are
unless it was defined with the "abort" flag. ignored, unless it was defined with the "abort" flag.
Parameters: ~ Parameters: ~
• {expr1} (`string|table`) • {expr1} (`string|table`)
@@ -2752,8 +2758,8 @@ foreach({expr1}, {expr2}) *foreach()*
Returns {expr1} in all cases. Returns {expr1} in all cases.
When an error is encountered while executing {expr2} no When an error is encountered while executing {expr2} no
further items in {expr1} are processed. further items in {expr1} are processed.
When {expr2} is a Funcref errors inside a function are ignored, When {expr2} is a Funcref errors inside a function are
unless it was defined with the "abort" flag. ignored, unless it was defined with the "abort" flag.
Parameters: ~ Parameters: ~
• {expr1} (`string|table`) • {expr1} (`string|table`)
@@ -2816,8 +2822,8 @@ function({name} [, {arglist}] [, {dict}]) *function()* *partial* *E700*
same function. same function.
When {arglist} or {dict} is present this creates a partial. When {arglist} or {dict} is present this creates a partial.
That means the argument list and/or the dictionary is stored in That means the argument list and/or the dictionary is stored
the Funcref and will be used when the Funcref is called. in the Funcref and will be used when the Funcref is called.
The arguments are passed to the function in front of other The arguments are passed to the function in front of other
arguments, but after any argument from |method|. Example: >vim arguments, but after any argument from |method|. Example: >vim
@@ -4068,15 +4074,16 @@ getqflist([{what}]) *getqflist()*
If not present, set to "". If not present, set to "".
id quickfix list ID |quickfix-ID|. If not id quickfix list ID |quickfix-ID|. If not
present, set to 0. present, set to 0.
idx index of the quickfix entry in the list. If not idx index of the quickfix entry in the list. If
present, set to 0. not present, set to 0.
items quickfix list entries. If not present, set to items quickfix list entries. If not present, set to
an empty list. an empty list.
nr quickfix list number. If not present, set to 0 nr quickfix list number. If not present, set to
0
qfbufnr number of the buffer displayed in the quickfix qfbufnr number of the buffer displayed in the quickfix
window. If not present, set to 0. window. If not present, set to 0.
size number of entries in the quickfix list. If not size number of entries in the quickfix list. If
present, set to 0. not present, set to 0.
title quickfix list title text. If not present, set title quickfix list title text. If not present, set
to "". to "".
winid quickfix |window-ID|. If not present, set to 0 winid quickfix |window-ID|. If not present, set to 0
@@ -4427,9 +4434,9 @@ gettagstack([{winnr}]) *gettagstack()*
from cursor position before the tag jump. from cursor position before the tag jump.
See |getpos()| for the format of the See |getpos()| for the format of the
returned list. returned list.
matchnr current matching tag number. Used when matchnr current matching tag number. Used
multiple matching tags are found for a when multiple matching tags are found
name. for a name.
tagname name of the tag tagname name of the tag
See |tagstack| for more information about the tag stack. See |tagstack| for more information about the tag stack.
@@ -4646,10 +4653,10 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {allinks}]]]) *globpath()*
'suffixes' affect the ordering of matches. 'suffixes' affect the ordering of matches.
When {list} is present and it is |TRUE| the result is a |List| When {list} is present and it is |TRUE| the result is a |List|
with all matching files. The advantage of using a List is, you with all matching files. The advantage of using a List is,
also get filenames containing newlines correctly. Otherwise you also get filenames containing newlines correctly.
the result is a String and when there are several matches, Otherwise the result is a String and when there are several
they are separated by <NL> characters. Example: >vim matches, they are separated by <NL> characters. Example: >vim
echo globpath(&rtp, "syntax/c.vim", 0, 1) echo globpath(&rtp, "syntax/c.vim", 0, 1)
< <
{allinks} is used as with |glob()|. {allinks} is used as with |glob()|.
@@ -5261,7 +5268,8 @@ inputrestore() *inputrestore()*
Restore typeahead that was saved with a previous |inputsave()|. Restore typeahead that was saved with a previous |inputsave()|.
Should be called the same number of times inputsave() is Should be called the same number of times inputsave() is
called. Calling it more often is harmless though. called. Calling it more often is harmless though.
Returns TRUE when there is nothing to restore, FALSE otherwise. Returns TRUE when there is nothing to restore, FALSE
otherwise.
Return: ~ Return: ~
(`integer`) (`integer`)
@@ -5352,10 +5360,11 @@ invert({expr}) *invert()*
isabsolutepath({path}) *isabsolutepath()* isabsolutepath({path}) *isabsolutepath()*
The result is a Number, which is |TRUE| when {path} is an The result is a Number, which is |TRUE| when {path} is an
absolute path. absolute path.
On Unix, a path is considered absolute when it starts with '/'. On Unix, a path is considered absolute when it starts with
On MS-Windows, it is considered absolute when it starts with an '/'.
optional drive prefix and is followed by a '\' or '/'. UNC paths On MS-Windows, it is considered absolute when it starts with
are always absolute. an optional drive prefix and is followed by a '\' or '/'. UNC
paths are always absolute.
Example: >vim Example: >vim
echo isabsolutepath('/usr/share/') " 1 echo isabsolutepath('/usr/share/') " 1
echo isabsolutepath('./foobar') " 0 echo isabsolutepath('./foobar') " 0
@@ -5985,8 +5994,8 @@ map({expr1}, {expr2}) *map()*
or a new |Blob| or |String|. or a new |Blob| or |String|.
When an error is encountered while evaluating {expr2} no When an error is encountered while evaluating {expr2} no
further items in {expr1} are processed. further items in {expr1} are processed.
When {expr2} is a Funcref errors inside a function are ignored, When {expr2} is a Funcref errors inside a function are
unless it was defined with the "abort" flag. ignored, unless it was defined with the "abort" flag.
Parameters: ~ Parameters: ~
• {expr1} (`string|table|any[]`) • {expr1} (`string|table|any[]`)
@@ -6174,8 +6183,9 @@ mapset({dict})
Restore a mapping from a dictionary, possibly returned by Restore a mapping from a dictionary, possibly returned by
|maparg()| or |maplist()|. A buffer mapping, when dict.buffer |maparg()| or |maplist()|. A buffer mapping, when dict.buffer
is true, is set on the current buffer; it is up to the caller is true, is set on the current buffer; it is up to the caller
to ensure that the intended buffer is the current buffer. This to ensure that the intended buffer is the current buffer.
feature allows copying mappings from one buffer to another. This feature allows copying mappings from one buffer to
another.
The dict.mode value may restore a single mapping that covers The dict.mode value may restore a single mapping that covers
more than one mode, like with mode values of '!', ' ', "nox", more than one mode, like with mode values of '!', ' ', "nox",
or 'v'. *E1276* or 'v'. *E1276*
@@ -6366,13 +6376,13 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]]) *matchaddpos()*
these: these:
- A number. This whole line will be highlighted. The first - A number. This whole line will be highlighted. The first
line has number 1. line has number 1.
- A list with one number, e.g., [23]. The whole line with this - A list with one number, e.g., [23]. The whole line with
number will be highlighted. this number will be highlighted.
- A list with two numbers, e.g., [23, 11]. The first number is - A list with two numbers, e.g., [23, 11]. The first number
the line number, the second one is the column number (first is the line number, the second one is the column number
column is 1, the value must correspond to the byte index as (first column is 1, the value must correspond to the byte
|col()| would return). The character at this position will index as |col()| would return). The character at this
be highlighted. position will be highlighted.
- A list with three numbers, e.g., [23, 11, 3]. As above, but - A list with three numbers, e.g., [23, 11, 3]. As above, but
the third number gives the length of the highlight in bytes. the third number gives the length of the highlight in bytes.
@@ -6832,11 +6842,11 @@ menu_info({name} [, {mode}]) *menu_info()*
noremenu v:true if the {rhs} of the menu item is not noremenu v:true if the {rhs} of the menu item is not
remappable else v:false. remappable else v:false.
priority menu order priority |menu-priority| priority menu order priority |menu-priority|
rhs right-hand-side of the menu item. The returned rhs right-hand-side of the menu item. The
string has special characters translated like returned string has special characters
in the output of the ":menu" command listing. translated like in the output of the ":menu"
When the {rhs} of a menu item is empty, then command listing. When the {rhs} of a menu
"<Nop>" is returned. item is empty, then "<Nop>" is returned.
script v:true if script-local remapping of {rhs} is script v:true if script-local remapping of {rhs} is
allowed else v:false. See |:menu-script|. allowed else v:false. See |:menu-script|.
shortcut shortcut key (character after '&' in shortcut shortcut key (character after '&' in
@@ -6988,8 +6998,8 @@ mode([{expr}]) *mode()*
This is useful in the 'statusline' option or RPC calls. In This is useful in the 'statusline' option or RPC calls. In
most other places it always returns "c" or "n". most other places it always returns "c" or "n".
Note that in the future more modes and more specific modes may Note that in the future more modes and more specific modes may
be added. It's better not to compare the whole string but only be added. It's better not to compare the whole string but
the leading character(s). only the leading character(s).
Also see |visualmode()|. Also see |visualmode()|.
Parameters: ~ Parameters: ~
@@ -7303,8 +7313,8 @@ printf({fmt}, {expr1} ...) *printf()*
% [pos-argument] [flags] [field-width] [.precision] type % [pos-argument] [flags] [field-width] [.precision] type
pos-argument pos-argument
At most one positional argument specifier. These At most one positional argument specifier. These take
take the form {n$}, where n is >= 1. the form {n$}, where n is >= 1.
flags flags
Zero or more of the following flags: Zero or more of the following flags:
@@ -7495,9 +7505,9 @@ printf({fmt}, {expr1} ...) *printf()*
"Bram", "Moolenaar") "Bram", "Moolenaar")
< In Belgium, vim's creator's name is: Moolenaar Bram < In Belgium, vim's creator's name is: Moolenaar Bram
Width (and precision) can be specified using the '*' specifier. Width (and precision) can be specified using the '*'
In this case, you must specify the field width position in the specifier. In this case, you must specify the field width
argument list. >vim position in the argument list. >vim
echo printf("%1$*2$.*3$d", 1, 2, 3) echo printf("%1$*2$.*3$d", 1, 2, 3)
< 001 >vim < 001 >vim
@@ -9074,8 +9084,8 @@ setline({lnum}, {text}) *setline()*
converted to a String. When {text} is an empty List then converted to a String. When {text} is an empty List then
nothing is changed and FALSE is returned. nothing is changed and FALSE is returned.
If this succeeds, FALSE is returned. If this fails (most likely If this succeeds, FALSE is returned. If this fails (most
because {lnum} is invalid) TRUE is returned. likely because {lnum} is invalid) TRUE is returned.
Example: >vim Example: >vim
call setline(5, strftime("%c")) call setline(5, strftime("%c"))
@@ -9201,10 +9211,10 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
argument is ignored. See below for the supported items in argument is ignored. See below for the supported items in
{what}. {what}.
*setqflist-what* *setqflist-what*
When {what} is not present, the items in {list} are used. Each When {what} is not present, the items in {list} are used.
item must be a dictionary. Non-dictionary items in {list} are Each item must be a dictionary. Non-dictionary items in
ignored. Each dictionary item can contain the following {list} are ignored. Each dictionary item can contain the
entries: following entries:
bufnr buffer number; must be the number of a valid bufnr buffer number; must be the number of a valid
buffer buffer
@@ -9271,9 +9281,9 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
See |quickfix-parse| See |quickfix-parse|
id quickfix list identifier |quickfix-ID| id quickfix list identifier |quickfix-ID|
idx index of the current entry in the quickfix idx index of the current entry in the quickfix
list specified by "id" or "nr". If set to '$', list specified by "id" or "nr". If set to
then the last entry in the list is set as the '$', then the last entry in the list is set as
current entry. See |quickfix-index| the current entry. See |quickfix-index|
items list of quickfix entries. Same as the {list} items list of quickfix entries. Same as the {list}
argument. argument.
lines use 'errorformat' to parse a list of lines and lines use 'errorformat' to parse a list of lines and
@@ -9291,9 +9301,9 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
of how to write the function and an example. of how to write the function and an example.
title quickfix list title text. See |quickfix-title| title quickfix list title text. See |quickfix-title|
Unsupported keys in {what} are ignored. Unsupported keys in {what} are ignored.
If the "nr" item is not present, then the current quickfix list If the "nr" item is not present, then the current quickfix
is modified. When creating a new quickfix list, "nr" can be list is modified. When creating a new quickfix list, "nr" can
set to a value one greater than the quickfix stack size. be set to a value one greater than the quickfix stack size.
When modifying a quickfix list, to guarantee that the correct When modifying a quickfix list, to guarantee that the correct
list is modified, "id" should be used instead of "nr" to list is modified, "id" should be used instead of "nr" to
specify the list. specify the list.
@@ -9346,8 +9356,8 @@ setreg({regname}, {value} [, {options}]) *setreg()*
*E883* *E883*
Note: you may not use |List| containing more than one item to Note: you may not use |List| containing more than one item to
set search and expression registers. Lists containing no set search and expression registers. Lists containing
items act like empty strings. no items act like empty strings.
Examples: >vim Examples: >vim
call setreg(v:register, @*) call setreg(v:register, @*)
@@ -9546,10 +9556,10 @@ shiftwidth([{col}]) *shiftwidth()*
endif endif
< And then use s:sw() instead of &sw. < And then use s:sw() instead of &sw.
When there is one argument {col} this is used as column number for which to return the 'shiftwidth' value. This matters for
for which to return the 'shiftwidth' value. This matters for the the 'vartabstop' feature. If the 'vartabstop' setting is
'vartabstop' feature. If no {col} argument is given, column 1 enabled and no {col} argument is given, column 1 will be
will be assumed. assumed.
Parameters: ~ Parameters: ~
• {col} (`integer?`) • {col} (`integer?`)
@@ -9667,8 +9677,8 @@ sign_getplaced([{buf} [, {dict}]]) *sign_getplaced()*
lnum select signs placed in this line. For the use lnum select signs placed in this line. For the use
of {lnum}, see |line()|. of {lnum}, see |line()|.
If {group} is "*", then signs in all the groups including the If {group} is "*", then signs in all the groups including the
global group are returned. If {group} is not supplied or is an global group are returned. If {group} is not supplied or is
empty string, then only signs in the global group are an empty string, then only signs in the global group are
returned. If no arguments are supplied, then signs in the returned. If no arguments are supplied, then signs in the
global group placed in all the buffers are returned. global group placed in all the buffers are returned.
See |sign-group|. See |sign-group|.
@@ -9752,8 +9762,8 @@ sign_place({id}, {group}, {name}, {buf} [, {dict}]) *sign_place()*
similar to the |:sign-place| command. similar to the |:sign-place| command.
If the sign identifier {id} is zero, then a new identifier is If the sign identifier {id} is zero, then a new identifier is
allocated. Otherwise the specified number is used. {group} is allocated. Otherwise the specified number is used. {group}
the sign group name. To use the global sign group, use an is the sign group name. To use the global sign group, use an
empty string. {group} functions as a namespace for {id}, thus empty string. {group} functions as a namespace for {id}, thus
two groups can use the same IDs. Refer to |sign-identifier| two groups can use the same IDs. Refer to |sign-identifier|
and |sign-group| for more information. and |sign-group| for more information.
@@ -10109,11 +10119,11 @@ sort({list} [, {how} [, {dict}]]) *sort()* *E70
ignore case. Zero means to not ignore case. ignore case. Zero means to not ignore case.
When {how} is given and it is 'l' then the current collation When {how} is given and it is 'l' then the current collation
locale is used for ordering. Implementation details: strcoll() locale is used for ordering. Implementation details:
is used to compare strings. See |:language| check or set the strcoll() is used to compare strings. See |:language| check
collation locale. |v:collate| can also be used to check the or set the collation locale. |v:collate| can also be used to
current locale. Sorting using the locale typically ignores check the current locale. Sorting using the locale typically
case. Example: >vim ignores case. Example: >vim
" ö is sorted similarly to o with English locale. " ö is sorted similarly to o with English locale.
language collate en_US.UTF8 language collate en_US.UTF8
echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l') echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
@@ -10572,7 +10582,8 @@ strdisplaywidth({string} [, {col}]) *strdisplaywidth()*
matters for anything that's displayed differently, such as matters for anything that's displayed differently, such as
'tabstop' and 'display'. 'tabstop' and 'display'.
When {string} contains characters with East Asian Width Class When {string} contains characters with East Asian Width Class
Ambiguous, this function's return value depends on 'ambiwidth'. Ambiguous, this function's return value depends on
'ambiwidth'.
Returns zero on error. Returns zero on error.
Also see |strlen()|, |strwidth()| and |strchars()|. Also see |strlen()|, |strwidth()| and |strchars()|.
@@ -10835,7 +10846,8 @@ strwidth({string}) *strwidth()*
String {string} occupies. A Tab character is counted as one String {string} occupies. A Tab character is counted as one
cell, alternatively use |strdisplaywidth()|. cell, alternatively use |strdisplaywidth()|.
When {string} contains characters with East Asian Width Class When {string} contains characters with East Asian Width Class
Ambiguous, this function's return value depends on 'ambiwidth'. Ambiguous, this function's return value depends on
'ambiwidth'.
Returns zero on error. Returns zero on error.
Also see |strlen()|, |strdisplaywidth()| and |strchars()|. Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
@@ -11206,10 +11218,10 @@ system({cmd} [, {input}]) *system()* *E67
systemlist({cmd} [, {input} [, {keepempty}]]) *systemlist()* systemlist({cmd} [, {input} [, {keepempty}]]) *systemlist()*
Same as |system()|, but returns a |List| with lines (parts of Same as |system()|, but returns a |List| with lines (parts of
output separated by NL) with NULs transformed into NLs. Output output separated by NL) with NULs transformed into NLs.
is the same as |readfile()| will output with {binary} argument Output is the same as |readfile()| will output with {binary}
set to "b", except that a final newline is not preserved, argument set to "b", except that a final newline is not
unless {keepempty} is non-zero. preserved, unless {keepempty} is non-zero.
Note that on MS-Windows you may get trailing CR characters. Note that on MS-Windows you may get trailing CR characters.
To see the difference between "echo hello" and "echo -n hello" To see the difference between "echo hello" and "echo -n hello"
@@ -11728,8 +11740,9 @@ utf16idx({string}, {idx} [, {countcc} [, {charidx}]]) *utf16idx()*
downwards to the beginning of that sequence. downwards to the beginning of that sequence.
Returns -1 if the arguments are invalid or if there are less Returns -1 if the arguments are invalid or if there are less
than {idx} bytes in {string}. If there are exactly {idx} bytes than {idx} bytes in {string}. If there are exactly {idx}
the length of the string in UTF-16 code units is returned. bytes the length of the string in UTF-16 code units is
returned.
See |byteidx()| and |byteidxcomp()| for getting the byte index See |byteidx()| and |byteidxcomp()| for getting the byte index
from the UTF-16 index and |charidx()| for getting the from the UTF-16 index and |charidx()| for getting the
@@ -12065,14 +12078,14 @@ win_move_separator({nr}, {offset}) *win_move_separator()*
win_move_statusline({nr}, {offset}) *win_move_statusline()* win_move_statusline({nr}, {offset}) *win_move_statusline()*
Move window {nr}'s status line (i.e., the bottom border) by Move window {nr}'s status line (i.e., the bottom border) by
{offset} rows, as if being dragged by the mouse. {nr} can be a {offset} rows, as if being dragged by the mouse. {nr} can be
window number or |window-ID|. A positive {offset} moves down a window number or |window-ID|. A positive {offset} moves
and a negative {offset} moves up. Moving a window's status down and a negative {offset} moves up. Moving a window's
line will change the height of the window and the height of status line will change the height of the window and the
other windows adjacent to the status line. The magnitude of height of other windows adjacent to the status line. The
movement may be smaller than specified (e.g., as a consequence magnitude of movement may be smaller than specified (e.g., as
of maintaining 'winminheight'). Returns TRUE if the window can a consequence of maintaining 'winminheight'). Returns TRUE if
be found and FALSE otherwise. the window can be found and FALSE otherwise.
Only works for the current tab page. Only works for the current tab page.
Parameters: ~ Parameters: ~
@@ -12291,7 +12304,8 @@ winrestview({dict}) *winrestview()*
This will only set the curswant value (the column the cursor This will only set the curswant value (the column the cursor
wants to move on vertical movements) of the cursor to column 5 wants to move on vertical movements) of the cursor to column 5
(yes, that is 5), while all other settings will remain the (yes, that is 5), while all other settings will remain the
same. This is useful, if you set the cursor position manually. same. This is useful, if you set the cursor position
manually.
If you have changed the values the result is unpredictable. If you have changed the values the result is unpredictable.
If the window size changed the result won't be the same. If the window size changed the result won't be the same.

View File

@@ -115,8 +115,8 @@ gN Like |gn| but searches backward, like with `N`.
active it is stopped. Only when 'mouse' option active it is stopped. Only when 'mouse' option
contains 'n' or 'a'. If the position is within 'so' contains 'n' or 'a'. If the position is within 'so'
lines from the last line on the screen the text is lines from the last line on the screen the text is
scrolled up. If the position is within 'so' lines from scrolled up. If the position is within 'so' lines
the first line on the screen the text is scrolled from the first line on the screen the text is scrolled
down. down.
*<RightMouse>* *<RightMouse>*
@@ -337,10 +337,10 @@ all lines.
*v_b_<* *v_b_<*
Visual-block Shift *v_b_>* Visual-block Shift *v_b_>*
The block is shifted by 'shiftwidth'. The RHS of the block is irrelevant. The The block is shifted by 'shiftwidth'. The RHS of the block is irrelevant.
LHS of the block determines the point from which to apply a right shift, and The LHS of the block determines the point from which to apply a right shift,
padding includes TABs optimally according to 'ts' and 'et'. The LHS of the and padding includes TABs optimally according to 'ts' and 'et'. The LHS of
block determines the point up to which to shift left. the block determines the point up to which to shift left.
See |v_b_>_example|. See |v_b_>_example|.
See |v_b_<_example|. See |v_b_<_example|.

View File

@@ -475,8 +475,8 @@ v:option_new
*v:option_old* *option_old-variable* *v:option_old* *option_old-variable*
v:option_old v:option_old
Old value of the option. Valid while executing an |OptionSet| Old value of the option. Valid while executing an |OptionSet|
autocommand. Depending on the command used for setting and the autocommand. Depending on the command used for setting and
kind of option this is either the local old value or the the kind of option this is either the local old value or the
global old value. global old value.
*v:option_oldglobal* *option_oldglobal-variable* *v:option_oldglobal* *option_oldglobal-variable*

View File

@@ -570,8 +570,8 @@ vim.go.breakat = vim.o.breakat
vim.go.brk = vim.go.breakat vim.go.brk = vim.go.breakat
--- Every wrapped line will continue visually indented (same amount of --- Every wrapped line will continue visually indented (same amount of
--- space as the beginning of that line), thus preserving horizontal blocks --- space as the beginning of that line), thus preserving horizontal
--- of text. --- blocks of text.
--- ---
--- @type boolean --- @type boolean
vim.o.breakindent = false vim.o.breakindent = false
@@ -1073,12 +1073,12 @@ vim.bo.cms = vim.bo.commentstring
--- ] tag completion --- ] tag completion
--- t same as "]" --- t same as "]"
--- f scan the buffer names (as opposed to buffer contents) --- f scan the buffer names (as opposed to buffer contents)
--- F{func} call the function {func}. Multiple "F" flags may be specified. --- F{func} call the function {func}. Multiple "F" flags may be
--- Refer to `complete-functions` for details on how the function --- specified. Refer to `complete-functions` for details on how
--- is invoked and what it should return. The value can be the --- the function is invoked and what it should return. The value
--- name of a function or a `Funcref`. For `Funcref` values, --- can be the name of a function or a `Funcref`. For `Funcref`
--- spaces must be escaped with a backslash ('\'), and commas with --- values, spaces must be escaped with a backslash ('\'), and
--- double backslashes ('\\') (see `option-backslash`). --- commas with double backslashes ('\\') (see `option-backslash`).
--- Unlike other sources, functions can provide completions --- Unlike other sources, functions can provide completions
--- starting from a non-keyword character before the cursor, and --- starting from a non-keyword character before the cursor, and
--- their start position for replacing text may differ from other --- their start position for replacing text may differ from other
@@ -1265,7 +1265,8 @@ vim.go.cot = vim.go.completeopt
--- completion in insert mode. This is useful when editing HTML tag, or --- completion in insert mode. This is useful when editing HTML tag, or
--- Makefile with 'noshellslash' on MS-Windows. --- Makefile with 'noshellslash' on MS-Windows.
--- - When this option is set to "backslash", backslash is used. This is --- - When this option is set to "backslash", backslash is used. This is
--- useful when editing a batch file with 'shellslash' set on MS-Windows. --- useful when editing a batch file with 'shellslash' set on
--- MS-Windows.
--- - When this option is empty, same character is used as for --- - When this option is empty, same character is used as for
--- 'shellslash'. --- 'shellslash'.
--- For Insert mode completion the buffer-local value is used. For --- For Insert mode completion the buffer-local value is used. For
@@ -2959,7 +2960,6 @@ vim.wo.fdt = vim.wo.foldtext
--- modeline, see `sandbox-option`. That stops the option from working, --- modeline, see `sandbox-option`. That stops the option from working,
--- since changing the buffer text is not allowed. --- since changing the buffer text is not allowed.
--- This option cannot be set in a modeline when 'modelineexpr' is off. --- This option cannot be set in a modeline when 'modelineexpr' is off.
--- NOTE: This option is set to "" when 'compatible' is set.
--- ---
--- @type string --- @type string
vim.o.formatexpr = "" vim.o.formatexpr = ""
@@ -4000,9 +4000,9 @@ vim.o.lm = vim.o.langmenu
vim.go.langmenu = vim.o.langmenu vim.go.langmenu = vim.o.langmenu
vim.go.lm = vim.go.langmenu vim.go.lm = vim.go.langmenu
--- When off, setting 'langmap' does not apply to characters resulting from --- When off, setting 'langmap' does not apply to characters resulting
--- a mapping. If setting 'langmap' disables some of your mappings, make --- from a mapping. If setting 'langmap' disables some of your mappings,
--- sure this option is off. --- make sure this option is off.
--- ---
--- @type boolean --- @type boolean
vim.o.langremap = false vim.o.langremap = false
@@ -4029,8 +4029,8 @@ vim.go.ls = vim.go.laststatus
--- executing macros, registers and other commands that have not been --- executing macros, registers and other commands that have not been
--- typed. Also, updating the window title is postponed. To force an --- typed. Also, updating the window title is postponed. To force an
--- update use `:redraw`. --- update use `:redraw`.
--- This may occasionally cause display errors. It is only meant to be set --- This may occasionally cause display errors. It is only meant to be
--- temporarily when performing an operation where redrawing may cause --- set temporarily when performing an operation where redrawing may cause
--- flickering or cause a slowdown. --- flickering or cause a slowdown.
--- ---
--- @type boolean --- @type boolean
@@ -6433,9 +6433,6 @@ vim.wo.sms = vim.wo.smoothscroll
--- 'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with --- 'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with
--- different values, you might consider setting 'smarttab'. --- different values, you might consider setting 'smarttab'.
--- ---
--- 'softtabstop' is temporarily set to 0 when 'paste' is on and reset
--- when it is turned off. It is also reset when 'compatible' is set.
---
--- The 'L' flag in 'cpoptions' alters tab behavior when 'list' is --- The 'L' flag in 'cpoptions' alters tab behavior when 'list' is
--- enabled. See also `ins-expandtab` ans user manual section `30.5` for --- enabled. See also `ins-expandtab` ans user manual section `30.5` for
--- in-depth explanations. --- in-depth explanations.

View File

@@ -597,7 +597,11 @@ function vim.fn.bufname(buf) end
--- above. --- above.
--- If the buffer doesn't exist, -1 is returned. Or, if the --- If the buffer doesn't exist, -1 is returned. Or, if the
--- {create} argument is present and TRUE, a new, unlisted, --- {create} argument is present and TRUE, a new, unlisted,
--- buffer is created and its number is returned. --- buffer is created and its number is returned. Example: >vim
--- let newbuf = bufnr('Scratch001', 1)
--- <Using an empty name uses the current buffer. To create a new
--- buffer with an empty name use |bufadd()|.
---
--- bufnr("$") is the last buffer: >vim --- bufnr("$") is the last buffer: >vim
--- let last_buffer = bufnr("$") --- let last_buffer = bufnr("$")
--- <The result is a Number, which is the highest buffer number --- <The result is a Number, which is the highest buffer number
@@ -992,10 +996,11 @@ function vim.fn.cmdcomplete_info() end
--- @return integer --- @return integer
function vim.fn.col(expr, winid) end function vim.fn.col(expr, winid) end
--- Set the matches for Insert mode completion. --- Set the matches for Insert mode completion. Can only be used
--- Can only be used in Insert mode. You need to use a mapping --- in Insert mode. Typically invoked from a mapping with
--- with CTRL-R = (see |i_CTRL-R|). It does not work after CTRL-O --- CTRL-R = (see |i_CTRL-R|), but may also be called from a
--- or with an expression mapping. --- |<Cmd>| mapping. It does not work after CTRL-O or with an
--- expression mapping.
--- {startcol} is the byte offset in the line where the completed --- {startcol} is the byte offset in the line where the completed
--- text start. The text up to the cursor is the original text --- text start. The text up to the cursor is the original text
--- that will be replaced by the matches. Use col('.') for an --- that will be replaced by the matches. Use col('.') for an
@@ -1056,7 +1061,8 @@ function vim.fn.complete_check() end
--- See |pumvisible()|. --- See |pumvisible()|.
--- items List of all completion candidates. Each item --- items List of all completion candidates. Each item
--- is a dictionary containing the entries "word", --- is a dictionary containing the entries "word",
--- "abbr", "menu", "kind", "info" and "user_data". --- "abbr", "menu", "kind", "info" and
--- "user_data".
--- See |complete-items|. --- See |complete-items|.
--- matches Same as "items", but only returns items that --- matches Same as "items", but only returns items that
--- are matching current query. If both "matches" --- are matching current query. If both "matches"
@@ -2182,8 +2188,8 @@ function vim.fn.filewritable(file) end
--- or a new |Blob| or |String|. --- or a new |Blob| or |String|.
--- When an error is encountered while evaluating {expr2} no --- When an error is encountered while evaluating {expr2} no
--- further items in {expr1} are processed. --- further items in {expr1} are processed.
--- When {expr2} is a Funcref errors inside a function are ignored, --- When {expr2} is a Funcref errors inside a function are
--- unless it was defined with the "abort" flag. --- ignored, unless it was defined with the "abort" flag.
--- ---
--- @param expr1 string|table --- @param expr1 string|table
--- @param expr2 string|function --- @param expr2 string|function
@@ -2455,8 +2461,8 @@ function vim.fn.foldtextresult(lnum) end
--- Returns {expr1} in all cases. --- Returns {expr1} in all cases.
--- When an error is encountered while executing {expr2} no --- When an error is encountered while executing {expr2} no
--- further items in {expr1} are processed. --- further items in {expr1} are processed.
--- When {expr2} is a Funcref errors inside a function are ignored, --- When {expr2} is a Funcref errors inside a function are
--- unless it was defined with the "abort" flag. --- ignored, unless it was defined with the "abort" flag.
--- ---
--- @param expr1 string|table --- @param expr1 string|table
--- @param expr2 string|function --- @param expr2 string|function
@@ -2510,8 +2516,8 @@ function vim.fn.funcref(name, arglist, dict) end
--- same function. --- same function.
--- ---
--- When {arglist} or {dict} is present this creates a partial. --- When {arglist} or {dict} is present this creates a partial.
--- That means the argument list and/or the dictionary is stored in --- That means the argument list and/or the dictionary is stored
--- the Funcref and will be used when the Funcref is called. --- in the Funcref and will be used when the Funcref is called.
--- ---
--- The arguments are passed to the function in front of other --- The arguments are passed to the function in front of other
--- arguments, but after any argument from |method|. Example: >vim --- arguments, but after any argument from |method|. Example: >vim
@@ -3664,15 +3670,16 @@ function vim.fn.getpos(expr) end
--- If not present, set to "". --- If not present, set to "".
--- id quickfix list ID |quickfix-ID|. If not --- id quickfix list ID |quickfix-ID|. If not
--- present, set to 0. --- present, set to 0.
--- idx index of the quickfix entry in the list. If not --- idx index of the quickfix entry in the list. If
--- present, set to 0. --- not present, set to 0.
--- items quickfix list entries. If not present, set to --- items quickfix list entries. If not present, set to
--- an empty list. --- an empty list.
--- nr quickfix list number. If not present, set to 0 --- nr quickfix list number. If not present, set to
--- 0
--- qfbufnr number of the buffer displayed in the quickfix --- qfbufnr number of the buffer displayed in the quickfix
--- window. If not present, set to 0. --- window. If not present, set to 0.
--- size number of entries in the quickfix list. If not --- size number of entries in the quickfix list. If
--- present, set to 0. --- not present, set to 0.
--- title quickfix list title text. If not present, set --- title quickfix list title text. If not present, set
--- to "". --- to "".
--- winid quickfix |window-ID|. If not present, set to 0 --- winid quickfix |window-ID|. If not present, set to 0
@@ -3997,9 +4004,9 @@ function vim.fn.gettabwinvar(tabnr, winnr, varname, def) end
--- from cursor position before the tag jump. --- from cursor position before the tag jump.
--- See |getpos()| for the format of the --- See |getpos()| for the format of the
--- returned list. --- returned list.
--- matchnr current matching tag number. Used when --- matchnr current matching tag number. Used
--- multiple matching tags are found for a --- when multiple matching tags are found
--- name. --- for a name.
--- tagname name of the tag --- tagname name of the tag
--- ---
--- See |tagstack| for more information about the tag stack. --- See |tagstack| for more information about the tag stack.
@@ -4193,10 +4200,10 @@ function vim.fn.glob2regpat(string) end
--- 'suffixes' affect the ordering of matches. --- 'suffixes' affect the ordering of matches.
--- ---
--- When {list} is present and it is |TRUE| the result is a |List| --- When {list} is present and it is |TRUE| the result is a |List|
--- with all matching files. The advantage of using a List is, you --- with all matching files. The advantage of using a List is,
--- also get filenames containing newlines correctly. Otherwise --- you also get filenames containing newlines correctly.
--- the result is a String and when there are several matches, --- Otherwise the result is a String and when there are several
--- they are separated by <NL> characters. Example: >vim --- matches, they are separated by <NL> characters. Example: >vim
--- echo globpath(&rtp, "syntax/c.vim", 0, 1) --- echo globpath(&rtp, "syntax/c.vim", 0, 1)
--- < --- <
--- {allinks} is used as with |glob()|. --- {allinks} is used as with |glob()|.
@@ -4771,7 +4778,8 @@ function vim.fn.inputlist(textlist) end
--- Restore typeahead that was saved with a previous |inputsave()|. --- Restore typeahead that was saved with a previous |inputsave()|.
--- Should be called the same number of times inputsave() is --- Should be called the same number of times inputsave() is
--- called. Calling it more often is harmless though. --- called. Calling it more often is harmless though.
--- Returns TRUE when there is nothing to restore, FALSE otherwise. --- Returns TRUE when there is nothing to restore, FALSE
--- otherwise.
--- ---
--- @return integer --- @return integer
function vim.fn.inputrestore() end function vim.fn.inputrestore() end
@@ -4850,10 +4858,11 @@ function vim.fn.invert(expr) end
--- The result is a Number, which is |TRUE| when {path} is an --- The result is a Number, which is |TRUE| when {path} is an
--- absolute path. --- absolute path.
--- On Unix, a path is considered absolute when it starts with '/'. --- On Unix, a path is considered absolute when it starts with
--- On MS-Windows, it is considered absolute when it starts with an --- '/'.
--- optional drive prefix and is followed by a '\' or '/'. UNC paths --- On MS-Windows, it is considered absolute when it starts with
--- are always absolute. --- an optional drive prefix and is followed by a '\' or '/'. UNC
--- paths are always absolute.
--- Example: >vim --- Example: >vim
--- echo isabsolutepath('/usr/share/') " 1 --- echo isabsolutepath('/usr/share/') " 1
--- echo isabsolutepath('./foobar') " 0 --- echo isabsolutepath('./foobar') " 0
@@ -5411,8 +5420,8 @@ function vim.fn.log10(expr) end
--- or a new |Blob| or |String|. --- or a new |Blob| or |String|.
--- When an error is encountered while evaluating {expr2} no --- When an error is encountered while evaluating {expr2} no
--- further items in {expr1} are processed. --- further items in {expr1} are processed.
--- When {expr2} is a Funcref errors inside a function are ignored, --- When {expr2} is a Funcref errors inside a function are
--- unless it was defined with the "abort" flag. --- ignored, unless it was defined with the "abort" flag.
--- ---
--- @param expr1 string|table|any[] --- @param expr1 string|table|any[]
--- @param expr2 string|function --- @param expr2 string|function
@@ -5597,8 +5606,9 @@ function vim.fn.mapset(mode, abbr, dict) end
--- Restore a mapping from a dictionary, possibly returned by --- Restore a mapping from a dictionary, possibly returned by
--- |maparg()| or |maplist()|. A buffer mapping, when dict.buffer --- |maparg()| or |maplist()|. A buffer mapping, when dict.buffer
--- is true, is set on the current buffer; it is up to the caller --- is true, is set on the current buffer; it is up to the caller
--- to ensure that the intended buffer is the current buffer. This --- to ensure that the intended buffer is the current buffer.
--- feature allows copying mappings from one buffer to another. --- This feature allows copying mappings from one buffer to
--- another.
--- The dict.mode value may restore a single mapping that covers --- The dict.mode value may restore a single mapping that covers
--- more than one mode, like with mode values of '!', ' ', "nox", --- more than one mode, like with mode values of '!', ' ', "nox",
--- or 'v'. *E1276* --- or 'v'. *E1276*
@@ -5779,13 +5789,13 @@ function vim.fn.matchadd(group, pattern, priority, id, dict) end
--- these: --- these:
--- - A number. This whole line will be highlighted. The first --- - A number. This whole line will be highlighted. The first
--- line has number 1. --- line has number 1.
--- - A list with one number, e.g., [23]. The whole line with this --- - A list with one number, e.g., [23]. The whole line with
--- number will be highlighted. --- this number will be highlighted.
--- - A list with two numbers, e.g., [23, 11]. The first number is --- - A list with two numbers, e.g., [23, 11]. The first number
--- the line number, the second one is the column number (first --- is the line number, the second one is the column number
--- column is 1, the value must correspond to the byte index as --- (first column is 1, the value must correspond to the byte
--- |col()| would return). The character at this position will --- index as |col()| would return). The character at this
--- be highlighted. --- position will be highlighted.
--- - A list with three numbers, e.g., [23, 11, 3]. As above, but --- - A list with three numbers, e.g., [23, 11, 3]. As above, but
--- the third number gives the length of the highlight in bytes. --- the third number gives the length of the highlight in bytes.
--- ---
@@ -6206,11 +6216,11 @@ function vim.fn.menu_get(path, modes) end
--- noremenu v:true if the {rhs} of the menu item is not --- noremenu v:true if the {rhs} of the menu item is not
--- remappable else v:false. --- remappable else v:false.
--- priority menu order priority |menu-priority| --- priority menu order priority |menu-priority|
--- rhs right-hand-side of the menu item. The returned --- rhs right-hand-side of the menu item. The
--- string has special characters translated like --- returned string has special characters
--- in the output of the ":menu" command listing. --- translated like in the output of the ":menu"
--- When the {rhs} of a menu item is empty, then --- command listing. When the {rhs} of a menu
--- "<Nop>" is returned. --- item is empty, then "<Nop>" is returned.
--- script v:true if script-local remapping of {rhs} is --- script v:true if script-local remapping of {rhs} is
--- allowed else v:false. See |:menu-script|. --- allowed else v:false. See |:menu-script|.
--- shortcut shortcut key (character after '&' in --- shortcut shortcut key (character after '&' in
@@ -6353,8 +6363,8 @@ function vim.fn.mkdir(name, flags, prot) end
--- This is useful in the 'statusline' option or RPC calls. In --- This is useful in the 'statusline' option or RPC calls. In
--- most other places it always returns "c" or "n". --- most other places it always returns "c" or "n".
--- Note that in the future more modes and more specific modes may --- Note that in the future more modes and more specific modes may
--- be added. It's better not to compare the whole string but only --- be added. It's better not to compare the whole string but
--- the leading character(s). --- only the leading character(s).
--- Also see |visualmode()|. --- Also see |visualmode()|.
--- ---
--- @param expr? any --- @param expr? any
@@ -6620,8 +6630,8 @@ function vim.fn.prevnonblank(lnum) end
--- % [pos-argument] [flags] [field-width] [.precision] type --- % [pos-argument] [flags] [field-width] [.precision] type
--- ---
--- pos-argument --- pos-argument
--- At most one positional argument specifier. These --- At most one positional argument specifier. These take
--- take the form {n$}, where n is >= 1. --- the form {n$}, where n is >= 1.
--- ---
--- flags --- flags
--- Zero or more of the following flags: --- Zero or more of the following flags:
@@ -6812,9 +6822,9 @@ function vim.fn.prevnonblank(lnum) end
--- "Bram", "Moolenaar") --- "Bram", "Moolenaar")
--- < In Belgium, vim's creator's name is: Moolenaar Bram --- < In Belgium, vim's creator's name is: Moolenaar Bram
--- ---
--- Width (and precision) can be specified using the '*' specifier. --- Width (and precision) can be specified using the '*'
--- In this case, you must specify the field width position in the --- specifier. In this case, you must specify the field width
--- argument list. >vim --- position in the argument list. >vim
--- ---
--- echo printf("%1$*2$.*3$d", 1, 2, 3) --- echo printf("%1$*2$.*3$d", 1, 2, 3)
--- < 001 >vim --- < 001 >vim
@@ -8264,8 +8274,8 @@ function vim.fn.setfperm(fname, mode) end
--- converted to a String. When {text} is an empty List then --- converted to a String. When {text} is an empty List then
--- nothing is changed and FALSE is returned. --- nothing is changed and FALSE is returned.
--- ---
--- If this succeeds, FALSE is returned. If this fails (most likely --- If this succeeds, FALSE is returned. If this fails (most
--- because {lnum} is invalid) TRUE is returned. --- likely because {lnum} is invalid) TRUE is returned.
--- ---
--- Example: >vim --- Example: >vim
--- call setline(5, strftime("%c")) --- call setline(5, strftime("%c"))
@@ -8379,10 +8389,10 @@ function vim.fn.setpos(expr, list) end
--- argument is ignored. See below for the supported items in --- argument is ignored. See below for the supported items in
--- {what}. --- {what}.
--- *setqflist-what* --- *setqflist-what*
--- When {what} is not present, the items in {list} are used. Each --- When {what} is not present, the items in {list} are used.
--- item must be a dictionary. Non-dictionary items in {list} are --- Each item must be a dictionary. Non-dictionary items in
--- ignored. Each dictionary item can contain the following --- {list} are ignored. Each dictionary item can contain the
--- entries: --- following entries:
--- ---
--- bufnr buffer number; must be the number of a valid --- bufnr buffer number; must be the number of a valid
--- buffer --- buffer
@@ -8449,9 +8459,9 @@ function vim.fn.setpos(expr, list) end
--- See |quickfix-parse| --- See |quickfix-parse|
--- id quickfix list identifier |quickfix-ID| --- id quickfix list identifier |quickfix-ID|
--- idx index of the current entry in the quickfix --- idx index of the current entry in the quickfix
--- list specified by "id" or "nr". If set to '$', --- list specified by "id" or "nr". If set to
--- then the last entry in the list is set as the --- '$', then the last entry in the list is set as
--- current entry. See |quickfix-index| --- the current entry. See |quickfix-index|
--- items list of quickfix entries. Same as the {list} --- items list of quickfix entries. Same as the {list}
--- argument. --- argument.
--- lines use 'errorformat' to parse a list of lines and --- lines use 'errorformat' to parse a list of lines and
@@ -8469,9 +8479,9 @@ function vim.fn.setpos(expr, list) end
--- of how to write the function and an example. --- of how to write the function and an example.
--- title quickfix list title text. See |quickfix-title| --- title quickfix list title text. See |quickfix-title|
--- Unsupported keys in {what} are ignored. --- Unsupported keys in {what} are ignored.
--- If the "nr" item is not present, then the current quickfix list --- If the "nr" item is not present, then the current quickfix
--- is modified. When creating a new quickfix list, "nr" can be --- list is modified. When creating a new quickfix list, "nr" can
--- set to a value one greater than the quickfix stack size. --- be set to a value one greater than the quickfix stack size.
--- When modifying a quickfix list, to guarantee that the correct --- When modifying a quickfix list, to guarantee that the correct
--- list is modified, "id" should be used instead of "nr" to --- list is modified, "id" should be used instead of "nr" to
--- specify the list. --- specify the list.
@@ -8521,8 +8531,8 @@ function vim.fn.setqflist(list, action, what) end
--- ---
--- *E883* --- *E883*
--- Note: you may not use |List| containing more than one item to --- Note: you may not use |List| containing more than one item to
--- set search and expression registers. Lists containing no --- set search and expression registers. Lists containing
--- items act like empty strings. --- no items act like empty strings.
--- ---
--- Examples: >vim --- Examples: >vim
--- call setreg(v:register, \@*) --- call setreg(v:register, \@*)
@@ -8700,10 +8710,10 @@ function vim.fn.shellescape(string, special) end
--- endif --- endif
--- <And then use s:sw() instead of &sw. --- <And then use s:sw() instead of &sw.
--- ---
--- When there is one argument {col} this is used as column number --- for which to return the 'shiftwidth' value. This matters for
--- for which to return the 'shiftwidth' value. This matters for the --- the 'vartabstop' feature. If the 'vartabstop' setting is
--- 'vartabstop' feature. If no {col} argument is given, column 1 --- enabled and no {col} argument is given, column 1 will be
--- will be assumed. --- assumed.
--- ---
--- @param col? integer --- @param col? integer
--- @return integer --- @return integer
@@ -8816,8 +8826,8 @@ function vim.fn.sign_getdefined(name) end
--- lnum select signs placed in this line. For the use --- lnum select signs placed in this line. For the use
--- of {lnum}, see |line()|. --- of {lnum}, see |line()|.
--- If {group} is "*", then signs in all the groups including the --- If {group} is "*", then signs in all the groups including the
--- global group are returned. If {group} is not supplied or is an --- global group are returned. If {group} is not supplied or is
--- empty string, then only signs in the global group are --- an empty string, then only signs in the global group are
--- returned. If no arguments are supplied, then signs in the --- returned. If no arguments are supplied, then signs in the
--- global group placed in all the buffers are returned. --- global group placed in all the buffers are returned.
--- See |sign-group|. --- See |sign-group|.
@@ -8895,8 +8905,8 @@ function vim.fn.sign_jump(id, group, buf) end
--- similar to the |:sign-place| command. --- similar to the |:sign-place| command.
--- ---
--- If the sign identifier {id} is zero, then a new identifier is --- If the sign identifier {id} is zero, then a new identifier is
--- allocated. Otherwise the specified number is used. {group} is --- allocated. Otherwise the specified number is used. {group}
--- the sign group name. To use the global sign group, use an --- is the sign group name. To use the global sign group, use an
--- empty string. {group} functions as a namespace for {id}, thus --- empty string. {group} functions as a namespace for {id}, thus
--- two groups can use the same IDs. Refer to |sign-identifier| --- two groups can use the same IDs. Refer to |sign-identifier|
--- and |sign-group| for more information. --- and |sign-group| for more information.
@@ -9225,11 +9235,11 @@ function vim.fn.sockconnect(mode, address, opts) end
--- ignore case. Zero means to not ignore case. --- ignore case. Zero means to not ignore case.
--- ---
--- When {how} is given and it is 'l' then the current collation --- When {how} is given and it is 'l' then the current collation
--- locale is used for ordering. Implementation details: strcoll() --- locale is used for ordering. Implementation details:
--- is used to compare strings. See |:language| check or set the --- strcoll() is used to compare strings. See |:language| check
--- collation locale. |v:collate| can also be used to check the --- or set the collation locale. |v:collate| can also be used to
--- current locale. Sorting using the locale typically ignores --- check the current locale. Sorting using the locale typically
--- case. Example: >vim --- ignores case. Example: >vim
--- " ö is sorted similarly to o with English locale. --- " ö is sorted similarly to o with English locale.
--- language collate en_US.UTF8 --- language collate en_US.UTF8
--- echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l') --- echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
@@ -9648,7 +9658,8 @@ function vim.fn.strchars(string, skipcc) end
--- matters for anything that's displayed differently, such as --- matters for anything that's displayed differently, such as
--- 'tabstop' and 'display'. --- 'tabstop' and 'display'.
--- When {string} contains characters with East Asian Width Class --- When {string} contains characters with East Asian Width Class
--- Ambiguous, this function's return value depends on 'ambiwidth'. --- Ambiguous, this function's return value depends on
--- 'ambiwidth'.
--- Returns zero on error. --- Returns zero on error.
--- Also see |strlen()|, |strwidth()| and |strchars()|. --- Also see |strlen()|, |strwidth()| and |strchars()|.
--- ---
@@ -9878,7 +9889,8 @@ function vim.fn.strutf16len(string, countcc) end
--- String {string} occupies. A Tab character is counted as one --- String {string} occupies. A Tab character is counted as one
--- cell, alternatively use |strdisplaywidth()|. --- cell, alternatively use |strdisplaywidth()|.
--- When {string} contains characters with East Asian Width Class --- When {string} contains characters with East Asian Width Class
--- Ambiguous, this function's return value depends on 'ambiwidth'. --- Ambiguous, this function's return value depends on
--- 'ambiwidth'.
--- Returns zero on error. --- Returns zero on error.
--- Also see |strlen()|, |strdisplaywidth()| and |strchars()|. --- Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
--- ---
@@ -10220,10 +10232,10 @@ function vim.fn.synstack(lnum, col) end
function vim.fn.system(cmd, input) end function vim.fn.system(cmd, input) end
--- Same as |system()|, but returns a |List| with lines (parts of --- Same as |system()|, but returns a |List| with lines (parts of
--- output separated by NL) with NULs transformed into NLs. Output --- output separated by NL) with NULs transformed into NLs.
--- is the same as |readfile()| will output with {binary} argument --- Output is the same as |readfile()| will output with {binary}
--- set to "b", except that a final newline is not preserved, --- argument set to "b", except that a final newline is not
--- unless {keepempty} is non-zero. --- preserved, unless {keepempty} is non-zero.
--- Note that on MS-Windows you may get trailing CR characters. --- Note that on MS-Windows you may get trailing CR characters.
--- ---
--- To see the difference between "echo hello" and "echo -n hello" --- To see the difference between "echo hello" and "echo -n hello"
@@ -10678,8 +10690,9 @@ function vim.fn.uniq(list, func, dict) end
--- downwards to the beginning of that sequence. --- downwards to the beginning of that sequence.
--- ---
--- Returns -1 if the arguments are invalid or if there are less --- Returns -1 if the arguments are invalid or if there are less
--- than {idx} bytes in {string}. If there are exactly {idx} bytes --- than {idx} bytes in {string}. If there are exactly {idx}
--- the length of the string in UTF-16 code units is returned. --- bytes the length of the string in UTF-16 code units is
--- returned.
--- ---
--- See |byteidx()| and |byteidxcomp()| for getting the byte index --- See |byteidx()| and |byteidxcomp()| for getting the byte index
--- from the UTF-16 index and |charidx()| for getting the --- from the UTF-16 index and |charidx()| for getting the
@@ -10971,14 +10984,14 @@ function vim.fn.win_id2win(expr) end
function vim.fn.win_move_separator(nr, offset) end function vim.fn.win_move_separator(nr, offset) end
--- Move window {nr}'s status line (i.e., the bottom border) by --- Move window {nr}'s status line (i.e., the bottom border) by
--- {offset} rows, as if being dragged by the mouse. {nr} can be a --- {offset} rows, as if being dragged by the mouse. {nr} can be
--- window number or |window-ID|. A positive {offset} moves down --- a window number or |window-ID|. A positive {offset} moves
--- and a negative {offset} moves up. Moving a window's status --- down and a negative {offset} moves up. Moving a window's
--- line will change the height of the window and the height of --- status line will change the height of the window and the
--- other windows adjacent to the status line. The magnitude of --- height of other windows adjacent to the status line. The
--- movement may be smaller than specified (e.g., as a consequence --- magnitude of movement may be smaller than specified (e.g., as
--- of maintaining 'winminheight'). Returns TRUE if the window can --- a consequence of maintaining 'winminheight'). Returns TRUE if
--- be found and FALSE otherwise. --- the window can be found and FALSE otherwise.
--- Only works for the current tab page. --- Only works for the current tab page.
--- ---
--- @param nr integer --- @param nr integer
@@ -11172,7 +11185,8 @@ function vim.fn.winrestcmd() end
--- This will only set the curswant value (the column the cursor --- This will only set the curswant value (the column the cursor
--- wants to move on vertical movements) of the cursor to column 5 --- wants to move on vertical movements) of the cursor to column 5
--- (yes, that is 5), while all other settings will remain the --- (yes, that is 5), while all other settings will remain the
--- same. This is useful, if you set the cursor position manually. --- same. This is useful, if you set the cursor position
--- manually.
--- ---
--- If you have changed the values the result is unpredictable. --- If you have changed the values the result is unpredictable.
--- If the window size changed the result won't be the same. --- If the window size changed the result won't be the same.

View File

@@ -495,8 +495,8 @@ vim.v.option_command = ...
vim.v.option_new = ... vim.v.option_new = ...
--- Old value of the option. Valid while executing an `OptionSet` --- Old value of the option. Valid while executing an `OptionSet`
--- autocommand. Depending on the command used for setting and the --- autocommand. Depending on the command used for setting and
--- kind of option this is either the local old value or the --- the kind of option this is either the local old value or the
--- global old value. --- global old value.
--- @type any --- @type any
vim.v.option_old = ... vim.v.option_old = ...

View File

@@ -840,7 +840,11 @@ M.funcs = {
above. above.
If the buffer doesn't exist, -1 is returned. Or, if the If the buffer doesn't exist, -1 is returned. Or, if the
{create} argument is present and TRUE, a new, unlisted, {create} argument is present and TRUE, a new, unlisted,
buffer is created and its number is returned. buffer is created and its number is returned. Example: >vim
let newbuf = bufnr('Scratch001', 1)
<Using an empty name uses the current buffer. To create a new
buffer with an empty name use |bufadd()|.
bufnr("$") is the last buffer: >vim bufnr("$") is the last buffer: >vim
let last_buffer = bufnr("$") let last_buffer = bufnr("$")
<The result is a Number, which is the highest buffer number <The result is a Number, which is the highest buffer number
@@ -1340,10 +1344,11 @@ M.funcs = {
args = 2, args = 2,
base = 2, base = 2,
desc = [=[ desc = [=[
Set the matches for Insert mode completion. Set the matches for Insert mode completion. Can only be used
Can only be used in Insert mode. You need to use a mapping in Insert mode. Typically invoked from a mapping with
with CTRL-R = (see |i_CTRL-R|). It does not work after CTRL-O CTRL-R = (see |i_CTRL-R|), but may also be called from a
or with an expression mapping. |<Cmd>| mapping. It does not work after CTRL-O or with an
expression mapping.
{startcol} is the byte offset in the line where the completed {startcol} is the byte offset in the line where the completed
text start. The text up to the cursor is the original text text start. The text up to the cursor is the original text
that will be replaced by the matches. Use col('.') for an that will be replaced by the matches. Use col('.') for an
@@ -1421,7 +1426,8 @@ M.funcs = {
See |pumvisible()|. See |pumvisible()|.
items List of all completion candidates. Each item items List of all completion candidates. Each item
is a dictionary containing the entries "word", is a dictionary containing the entries "word",
"abbr", "menu", "kind", "info" and "user_data". "abbr", "menu", "kind", "info" and
"user_data".
See |complete-items|. See |complete-items|.
matches Same as "items", but only returns items that matches Same as "items", but only returns items that
are matching current query. If both "matches" are matching current query. If both "matches"
@@ -2775,8 +2781,8 @@ M.funcs = {
or a new |Blob| or |String|. or a new |Blob| or |String|.
When an error is encountered while evaluating {expr2} no When an error is encountered while evaluating {expr2} no
further items in {expr1} are processed. further items in {expr1} are processed.
When {expr2} is a Funcref errors inside a function are ignored, When {expr2} is a Funcref errors inside a function are
unless it was defined with the "abort" flag. ignored, unless it was defined with the "abort" flag.
]=], ]=],
name = 'filter', name = 'filter',
@@ -3124,8 +3130,8 @@ M.funcs = {
Returns {expr1} in all cases. Returns {expr1} in all cases.
When an error is encountered while executing {expr2} no When an error is encountered while executing {expr2} no
further items in {expr1} are processed. further items in {expr1} are processed.
When {expr2} is a Funcref errors inside a function are ignored, When {expr2} is a Funcref errors inside a function are
unless it was defined with the "abort" flag. ignored, unless it was defined with the "abort" flag.
]=], ]=],
name = 'foreach', name = 'foreach',
params = { { 'expr1', 'string|table' }, { 'expr2', 'string|function' } }, params = { { 'expr1', 'string|table' }, { 'expr2', 'string|function' } },
@@ -3197,8 +3203,8 @@ M.funcs = {
same function. same function.
When {arglist} or {dict} is present this creates a partial. When {arglist} or {dict} is present this creates a partial.
That means the argument list and/or the dictionary is stored in That means the argument list and/or the dictionary is stored
the Funcref and will be used when the Funcref is called. in the Funcref and will be used when the Funcref is called.
The arguments are passed to the function in front of other The arguments are passed to the function in front of other
arguments, but after any argument from |method|. Example: >vim arguments, but after any argument from |method|. Example: >vim
@@ -4549,15 +4555,16 @@ M.funcs = {
If not present, set to "". If not present, set to "".
id quickfix list ID |quickfix-ID|. If not id quickfix list ID |quickfix-ID|. If not
present, set to 0. present, set to 0.
idx index of the quickfix entry in the list. If not idx index of the quickfix entry in the list. If
present, set to 0. not present, set to 0.
items quickfix list entries. If not present, set to items quickfix list entries. If not present, set to
an empty list. an empty list.
nr quickfix list number. If not present, set to 0 nr quickfix list number. If not present, set to
0
qfbufnr number of the buffer displayed in the quickfix qfbufnr number of the buffer displayed in the quickfix
window. If not present, set to 0. window. If not present, set to 0.
size number of entries in the quickfix list. If not size number of entries in the quickfix list. If
present, set to 0. not present, set to 0.
title quickfix list title text. If not present, set title quickfix list title text. If not present, set
to "". to "".
winid quickfix |window-ID|. If not present, set to 0 winid quickfix |window-ID|. If not present, set to 0
@@ -4940,9 +4947,9 @@ M.funcs = {
from cursor position before the tag jump. from cursor position before the tag jump.
See |getpos()| for the format of the See |getpos()| for the format of the
returned list. returned list.
matchnr current matching tag number. Used when matchnr current matching tag number. Used
multiple matching tags are found for a when multiple matching tags are found
name. for a name.
tagname name of the tag tagname name of the tag
See |tagstack| for more information about the tag stack. See |tagstack| for more information about the tag stack.
@@ -5179,10 +5186,10 @@ M.funcs = {
'suffixes' affect the ordering of matches. 'suffixes' affect the ordering of matches.
When {list} is present and it is |TRUE| the result is a |List| When {list} is present and it is |TRUE| the result is a |List|
with all matching files. The advantage of using a List is, you with all matching files. The advantage of using a List is,
also get filenames containing newlines correctly. Otherwise you also get filenames containing newlines correctly.
the result is a String and when there are several matches, Otherwise the result is a String and when there are several
they are separated by <NL> characters. Example: >vim matches, they are separated by <NL> characters. Example: >vim
echo globpath(&rtp, "syntax/c.vim", 0, 1) echo globpath(&rtp, "syntax/c.vim", 0, 1)
< <
{allinks} is used as with |glob()|. {allinks} is used as with |glob()|.
@@ -5861,7 +5868,8 @@ M.funcs = {
Restore typeahead that was saved with a previous |inputsave()|. Restore typeahead that was saved with a previous |inputsave()|.
Should be called the same number of times inputsave() is Should be called the same number of times inputsave() is
called. Calling it more often is harmless though. called. Calling it more often is harmless though.
Returns TRUE when there is nothing to restore, FALSE otherwise. Returns TRUE when there is nothing to restore, FALSE
otherwise.
]=], ]=],
name = 'inputrestore', name = 'inputrestore',
params = {}, params = {},
@@ -5967,10 +5975,11 @@ M.funcs = {
desc = [=[ desc = [=[
The result is a Number, which is |TRUE| when {path} is an The result is a Number, which is |TRUE| when {path} is an
absolute path. absolute path.
On Unix, a path is considered absolute when it starts with '/'. On Unix, a path is considered absolute when it starts with
On MS-Windows, it is considered absolute when it starts with an '/'.
optional drive prefix and is followed by a '\' or '/'. UNC paths On MS-Windows, it is considered absolute when it starts with
are always absolute. an optional drive prefix and is followed by a '\' or '/'. UNC
paths are always absolute.
Example: >vim Example: >vim
echo isabsolutepath('/usr/share/') " 1 echo isabsolutepath('/usr/share/') " 1
echo isabsolutepath('./foobar') " 0 echo isabsolutepath('./foobar') " 0
@@ -6688,8 +6697,8 @@ M.funcs = {
or a new |Blob| or |String|. or a new |Blob| or |String|.
When an error is encountered while evaluating {expr2} no When an error is encountered while evaluating {expr2} no
further items in {expr1} are processed. further items in {expr1} are processed.
When {expr2} is a Funcref errors inside a function are ignored, When {expr2} is a Funcref errors inside a function are
unless it was defined with the "abort" flag. ignored, unless it was defined with the "abort" flag.
]=], ]=],
name = 'map', name = 'map',
@@ -6902,8 +6911,9 @@ M.funcs = {
Restore a mapping from a dictionary, possibly returned by Restore a mapping from a dictionary, possibly returned by
|maparg()| or |maplist()|. A buffer mapping, when dict.buffer |maparg()| or |maplist()|. A buffer mapping, when dict.buffer
is true, is set on the current buffer; it is up to the caller is true, is set on the current buffer; it is up to the caller
to ensure that the intended buffer is the current buffer. This to ensure that the intended buffer is the current buffer.
feature allows copying mappings from one buffer to another. This feature allows copying mappings from one buffer to
another.
The dict.mode value may restore a single mapping that covers The dict.mode value may restore a single mapping that covers
more than one mode, like with mode values of '!', ' ', "nox", more than one mode, like with mode values of '!', ' ', "nox",
or 'v'. *E1276* or 'v'. *E1276*
@@ -7105,13 +7115,13 @@ M.funcs = {
these: these:
- A number. This whole line will be highlighted. The first - A number. This whole line will be highlighted. The first
line has number 1. line has number 1.
- A list with one number, e.g., [23]. The whole line with this - A list with one number, e.g., [23]. The whole line with
number will be highlighted. this number will be highlighted.
- A list with two numbers, e.g., [23, 11]. The first number is - A list with two numbers, e.g., [23, 11]. The first number
the line number, the second one is the column number (first is the line number, the second one is the column number
column is 1, the value must correspond to the byte index as (first column is 1, the value must correspond to the byte
|col()| would return). The character at this position will index as |col()| would return). The character at this
be highlighted. position will be highlighted.
- A list with three numbers, e.g., [23, 11, 3]. As above, but - A list with three numbers, e.g., [23, 11, 3]. As above, but
the third number gives the length of the highlight in bytes. the third number gives the length of the highlight in bytes.
@@ -7607,11 +7617,11 @@ M.funcs = {
noremenu v:true if the {rhs} of the menu item is not noremenu v:true if the {rhs} of the menu item is not
remappable else v:false. remappable else v:false.
priority menu order priority |menu-priority| priority menu order priority |menu-priority|
rhs right-hand-side of the menu item. The returned rhs right-hand-side of the menu item. The
string has special characters translated like returned string has special characters
in the output of the ":menu" command listing. translated like in the output of the ":menu"
When the {rhs} of a menu item is empty, then command listing. When the {rhs} of a menu
"<Nop>" is returned. item is empty, then "<Nop>" is returned.
script v:true if script-local remapping of {rhs} is script v:true if script-local remapping of {rhs} is
allowed else v:false. See |:menu-script|. allowed else v:false. See |:menu-script|.
shortcut shortcut key (character after '&' in shortcut shortcut key (character after '&' in
@@ -7768,8 +7778,8 @@ M.funcs = {
This is useful in the 'statusline' option or RPC calls. In This is useful in the 'statusline' option or RPC calls. In
most other places it always returns "c" or "n". most other places it always returns "c" or "n".
Note that in the future more modes and more specific modes may Note that in the future more modes and more specific modes may
be added. It's better not to compare the whole string but only be added. It's better not to compare the whole string but
the leading character(s). only the leading character(s).
Also see |visualmode()|. Also see |visualmode()|.
]=], ]=],
@@ -8104,8 +8114,8 @@ M.funcs = {
% [pos-argument] [flags] [field-width] [.precision] type % [pos-argument] [flags] [field-width] [.precision] type
pos-argument pos-argument
At most one positional argument specifier. These At most one positional argument specifier. These take
take the form {n$}, where n is >= 1. the form {n$}, where n is >= 1.
flags flags
Zero or more of the following flags: Zero or more of the following flags:
@@ -8296,9 +8306,9 @@ M.funcs = {
"Bram", "Moolenaar") "Bram", "Moolenaar")
< In Belgium, vim's creator's name is: Moolenaar Bram < In Belgium, vim's creator's name is: Moolenaar Bram
Width (and precision) can be specified using the '*' specifier. Width (and precision) can be specified using the '*'
In this case, you must specify the field width position in the specifier. In this case, you must specify the field width
argument list. >vim position in the argument list. >vim
echo printf("%1$*2$.*3$d", 1, 2, 3) echo printf("%1$*2$.*3$d", 1, 2, 3)
< 001 >vim < 001 >vim
@@ -10030,8 +10040,8 @@ M.funcs = {
converted to a String. When {text} is an empty List then converted to a String. When {text} is an empty List then
nothing is changed and FALSE is returned. nothing is changed and FALSE is returned.
If this succeeds, FALSE is returned. If this fails (most likely If this succeeds, FALSE is returned. If this fails (most
because {lnum} is invalid) TRUE is returned. likely because {lnum} is invalid) TRUE is returned.
Example: >vim Example: >vim
call setline(5, strftime("%c")) call setline(5, strftime("%c"))
@@ -10159,10 +10169,10 @@ M.funcs = {
argument is ignored. See below for the supported items in argument is ignored. See below for the supported items in
{what}. {what}.
*setqflist-what* *setqflist-what*
When {what} is not present, the items in {list} are used. Each When {what} is not present, the items in {list} are used.
item must be a dictionary. Non-dictionary items in {list} are Each item must be a dictionary. Non-dictionary items in
ignored. Each dictionary item can contain the following {list} are ignored. Each dictionary item can contain the
entries: following entries:
bufnr buffer number; must be the number of a valid bufnr buffer number; must be the number of a valid
buffer buffer
@@ -10229,9 +10239,9 @@ M.funcs = {
See |quickfix-parse| See |quickfix-parse|
id quickfix list identifier |quickfix-ID| id quickfix list identifier |quickfix-ID|
idx index of the current entry in the quickfix idx index of the current entry in the quickfix
list specified by "id" or "nr". If set to '$', list specified by "id" or "nr". If set to
then the last entry in the list is set as the '$', then the last entry in the list is set as
current entry. See |quickfix-index| the current entry. See |quickfix-index|
items list of quickfix entries. Same as the {list} items list of quickfix entries. Same as the {list}
argument. argument.
lines use 'errorformat' to parse a list of lines and lines use 'errorformat' to parse a list of lines and
@@ -10249,9 +10259,9 @@ M.funcs = {
of how to write the function and an example. of how to write the function and an example.
title quickfix list title text. See |quickfix-title| title quickfix list title text. See |quickfix-title|
Unsupported keys in {what} are ignored. Unsupported keys in {what} are ignored.
If the "nr" item is not present, then the current quickfix list If the "nr" item is not present, then the current quickfix
is modified. When creating a new quickfix list, "nr" can be list is modified. When creating a new quickfix list, "nr" can
set to a value one greater than the quickfix stack size. be set to a value one greater than the quickfix stack size.
When modifying a quickfix list, to guarantee that the correct When modifying a quickfix list, to guarantee that the correct
list is modified, "id" should be used instead of "nr" to list is modified, "id" should be used instead of "nr" to
specify the list. specify the list.
@@ -10309,8 +10319,8 @@ M.funcs = {
*E883* *E883*
Note: you may not use |List| containing more than one item to Note: you may not use |List| containing more than one item to
set search and expression registers. Lists containing no set search and expression registers. Lists containing
items act like empty strings. no items act like empty strings.
Examples: >vim Examples: >vim
call setreg(v:register, @*) call setreg(v:register, @*)
@@ -10515,10 +10525,10 @@ M.funcs = {
endif endif
<And then use s:sw() instead of &sw. <And then use s:sw() instead of &sw.
When there is one argument {col} this is used as column number for which to return the 'shiftwidth' value. This matters for
for which to return the 'shiftwidth' value. This matters for the the 'vartabstop' feature. If the 'vartabstop' setting is
'vartabstop' feature. If no {col} argument is given, column 1 enabled and no {col} argument is given, column 1 will be
will be assumed. assumed.
]=], ]=],
name = 'shiftwidth', name = 'shiftwidth',
@@ -10650,8 +10660,8 @@ M.funcs = {
lnum select signs placed in this line. For the use lnum select signs placed in this line. For the use
of {lnum}, see |line()|. of {lnum}, see |line()|.
If {group} is "*", then signs in all the groups including the If {group} is "*", then signs in all the groups including the
global group are returned. If {group} is not supplied or is an global group are returned. If {group} is not supplied or is
empty string, then only signs in the global group are an empty string, then only signs in the global group are
returned. If no arguments are supplied, then signs in the returned. If no arguments are supplied, then signs in the
global group placed in all the buffers are returned. global group placed in all the buffers are returned.
See |sign-group|. See |sign-group|.
@@ -10736,8 +10746,8 @@ M.funcs = {
similar to the |:sign-place| command. similar to the |:sign-place| command.
If the sign identifier {id} is zero, then a new identifier is If the sign identifier {id} is zero, then a new identifier is
allocated. Otherwise the specified number is used. {group} is allocated. Otherwise the specified number is used. {group}
the sign group name. To use the global sign group, use an is the sign group name. To use the global sign group, use an
empty string. {group} functions as a namespace for {id}, thus empty string. {group} functions as a namespace for {id}, thus
two groups can use the same IDs. Refer to |sign-identifier| two groups can use the same IDs. Refer to |sign-identifier|
and |sign-group| for more information. and |sign-group| for more information.
@@ -11120,11 +11130,11 @@ M.funcs = {
ignore case. Zero means to not ignore case. ignore case. Zero means to not ignore case.
When {how} is given and it is 'l' then the current collation When {how} is given and it is 'l' then the current collation
locale is used for ordering. Implementation details: strcoll() locale is used for ordering. Implementation details:
is used to compare strings. See |:language| check or set the strcoll() is used to compare strings. See |:language| check
collation locale. |v:collate| can also be used to check the or set the collation locale. |v:collate| can also be used to
current locale. Sorting using the locale typically ignores check the current locale. Sorting using the locale typically
case. Example: >vim ignores case. Example: >vim
" ö is sorted similarly to o with English locale. " ö is sorted similarly to o with English locale.
language collate en_US.UTF8 language collate en_US.UTF8
echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l') echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
@@ -11623,7 +11633,8 @@ M.funcs = {
matters for anything that's displayed differently, such as matters for anything that's displayed differently, such as
'tabstop' and 'display'. 'tabstop' and 'display'.
When {string} contains characters with East Asian Width Class When {string} contains characters with East Asian Width Class
Ambiguous, this function's return value depends on 'ambiwidth'. Ambiguous, this function's return value depends on
'ambiwidth'.
Returns zero on error. Returns zero on error.
Also see |strlen()|, |strwidth()| and |strchars()|. Also see |strlen()|, |strwidth()| and |strchars()|.
@@ -11917,7 +11928,8 @@ M.funcs = {
String {string} occupies. A Tab character is counted as one String {string} occupies. A Tab character is counted as one
cell, alternatively use |strdisplaywidth()|. cell, alternatively use |strdisplaywidth()|.
When {string} contains characters with East Asian Width Class When {string} contains characters with East Asian Width Class
Ambiguous, this function's return value depends on 'ambiwidth'. Ambiguous, this function's return value depends on
'ambiwidth'.
Returns zero on error. Returns zero on error.
Also see |strlen()|, |strdisplaywidth()| and |strchars()|. Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
@@ -12323,10 +12335,10 @@ M.funcs = {
base = 1, base = 1,
desc = [=[ desc = [=[
Same as |system()|, but returns a |List| with lines (parts of Same as |system()|, but returns a |List| with lines (parts of
output separated by NL) with NULs transformed into NLs. Output output separated by NL) with NULs transformed into NLs.
is the same as |readfile()| will output with {binary} argument Output is the same as |readfile()| will output with {binary}
set to "b", except that a final newline is not preserved, argument set to "b", except that a final newline is not
unless {keepempty} is non-zero. preserved, unless {keepempty} is non-zero.
Note that on MS-Windows you may get trailing CR characters. Note that on MS-Windows you may get trailing CR characters.
To see the difference between "echo hello" and "echo -n hello" To see the difference between "echo hello" and "echo -n hello"
@@ -12925,8 +12937,9 @@ M.funcs = {
downwards to the beginning of that sequence. downwards to the beginning of that sequence.
Returns -1 if the arguments are invalid or if there are less Returns -1 if the arguments are invalid or if there are less
than {idx} bytes in {string}. If there are exactly {idx} bytes than {idx} bytes in {string}. If there are exactly {idx}
the length of the string in UTF-16 code units is returned. bytes the length of the string in UTF-16 code units is
returned.
See |byteidx()| and |byteidxcomp()| for getting the byte index See |byteidx()| and |byteidxcomp()| for getting the byte index
from the UTF-16 index and |charidx()| for getting the from the UTF-16 index and |charidx()| for getting the
@@ -13291,14 +13304,14 @@ M.funcs = {
base = 1, base = 1,
desc = [=[ desc = [=[
Move window {nr}'s status line (i.e., the bottom border) by Move window {nr}'s status line (i.e., the bottom border) by
{offset} rows, as if being dragged by the mouse. {nr} can be a {offset} rows, as if being dragged by the mouse. {nr} can be
window number or |window-ID|. A positive {offset} moves down a window number or |window-ID|. A positive {offset} moves
and a negative {offset} moves up. Moving a window's status down and a negative {offset} moves up. Moving a window's
line will change the height of the window and the height of status line will change the height of the window and the
other windows adjacent to the status line. The magnitude of height of other windows adjacent to the status line. The
movement may be smaller than specified (e.g., as a consequence magnitude of movement may be smaller than specified (e.g., as
of maintaining 'winminheight'). Returns TRUE if the window can a consequence of maintaining 'winminheight'). Returns TRUE if
be found and FALSE otherwise. the window can be found and FALSE otherwise.
Only works for the current tab page. Only works for the current tab page.
]=], ]=],
@@ -13540,7 +13553,8 @@ M.funcs = {
This will only set the curswant value (the column the cursor This will only set the curswant value (the column the cursor
wants to move on vertical movements) of the cursor to column 5 wants to move on vertical movements) of the cursor to column 5
(yes, that is 5), while all other settings will remain the (yes, that is 5), while all other settings will remain the
same. This is useful, if you set the cursor position manually. same. This is useful, if you set the cursor position
manually.
If you have changed the values the result is unpredictable. If you have changed the values the result is unpredictable.
If the window size changed the result won't be the same. If the window size changed the result won't be the same.

View File

@@ -806,8 +806,8 @@ local options = {
defaults = false, defaults = false,
desc = [=[ desc = [=[
Every wrapped line will continue visually indented (same amount of Every wrapped line will continue visually indented (same amount of
space as the beginning of that line), thus preserving horizontal blocks space as the beginning of that line), thus preserving horizontal
of text. blocks of text.
]=], ]=],
full_name = 'breakindent', full_name = 'breakindent',
redraw = { 'current_window' }, redraw = { 'current_window' },
@@ -1507,12 +1507,12 @@ local options = {
] tag completion ] tag completion
t same as "]" t same as "]"
f scan the buffer names (as opposed to buffer contents) f scan the buffer names (as opposed to buffer contents)
F{func} call the function {func}. Multiple "F" flags may be specified. F{func} call the function {func}. Multiple "F" flags may be
Refer to |complete-functions| for details on how the function specified. Refer to |complete-functions| for details on how
is invoked and what it should return. The value can be the the function is invoked and what it should return. The value
name of a function or a |Funcref|. For |Funcref| values, can be the name of a function or a |Funcref|. For |Funcref|
spaces must be escaped with a backslash ('\'), and commas with values, spaces must be escaped with a backslash ('\'), and
double backslashes ('\\') (see |option-backslash|). commas with double backslashes ('\\') (see |option-backslash|).
Unlike other sources, functions can provide completions Unlike other sources, functions can provide completions
starting from a non-keyword character before the cursor, and starting from a non-keyword character before the cursor, and
their start position for replacing text may differ from other their start position for replacing text may differ from other
@@ -1751,7 +1751,8 @@ local options = {
completion in insert mode. This is useful when editing HTML tag, or completion in insert mode. This is useful when editing HTML tag, or
Makefile with 'noshellslash' on MS-Windows. Makefile with 'noshellslash' on MS-Windows.
- When this option is set to "backslash", backslash is used. This is - When this option is set to "backslash", backslash is used. This is
useful when editing a batch file with 'shellslash' set on MS-Windows. useful when editing a batch file with 'shellslash' set on
MS-Windows.
- When this option is empty, same character is used as for - When this option is empty, same character is used as for
'shellslash'. 'shellslash'.
For Insert mode completion the buffer-local value is used. For For Insert mode completion the buffer-local value is used. For
@@ -3760,7 +3761,6 @@ local options = {
modeline, see |sandbox-option|. That stops the option from working, modeline, see |sandbox-option|. That stops the option from working,
since changing the buffer text is not allowed. since changing the buffer text is not allowed.
This option cannot be set in a modeline when 'modelineexpr' is off. This option cannot be set in a modeline when 'modelineexpr' is off.
NOTE: This option is set to "" when 'compatible' is set.
]=], ]=],
full_name = 'formatexpr', full_name = 'formatexpr',
modelineexpr = true, modelineexpr = true,
@@ -5243,9 +5243,9 @@ local options = {
cb = 'did_set_langremap', cb = 'did_set_langremap',
defaults = false, defaults = false,
desc = [=[ desc = [=[
When off, setting 'langmap' does not apply to characters resulting from When off, setting 'langmap' does not apply to characters resulting
a mapping. If setting 'langmap' disables some of your mappings, make from a mapping. If setting 'langmap' disables some of your mappings,
sure this option is off. make sure this option is off.
]=], ]=],
full_name = 'langremap', full_name = 'langremap',
scope = { 'global' }, scope = { 'global' },
@@ -5282,8 +5282,8 @@ local options = {
executing macros, registers and other commands that have not been executing macros, registers and other commands that have not been
typed. Also, updating the window title is postponed. To force an typed. Also, updating the window title is postponed. To force an
update use |:redraw|. update use |:redraw|.
This may occasionally cause display errors. It is only meant to be set This may occasionally cause display errors. It is only meant to be
temporarily when performing an operation where redrawing may cause set temporarily when performing an operation where redrawing may cause
flickering or cause a slowdown. flickering or cause a slowdown.
]=], ]=],
full_name = 'lazyredraw', full_name = 'lazyredraw',
@@ -8429,9 +8429,6 @@ local options = {
'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with 'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with
different values, you might consider setting 'smarttab'. different values, you might consider setting 'smarttab'.
'softtabstop' is temporarily set to 0 when 'paste' is on and reset
when it is turned off. It is also reset when 'compatible' is set.
The 'L' flag in 'cpoptions' alters tab behavior when 'list' is The 'L' flag in 'cpoptions' alters tab behavior when 'list' is
enabled. See also |ins-expandtab| ans user manual section |30.5| for enabled. See also |ins-expandtab| ans user manual section |30.5| for
in-depth explanations. in-depth explanations.

View File

@@ -564,8 +564,8 @@ M.vars = {
option_old = { option_old = {
desc = [=[ desc = [=[
Old value of the option. Valid while executing an |OptionSet| Old value of the option. Valid while executing an |OptionSet|
autocommand. Depending on the command used for setting and the autocommand. Depending on the command used for setting and
kind of option this is either the local old value or the the kind of option this is either the local old value or the
global old value. global old value.
]=], ]=],
}, },