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 After changing the mode. The pattern is
matched against `'old_mode:new_mode'`, for
example match against `*:c` to simulate
example match against `*:c*` to simulate
|CmdlineEnter|.
The following values of |v:event| are set:
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
(except `:d`) and undo them. Use Visual mode to delete blocks of text. See
|registers| for an explanation of registers.
*d-special*
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
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'.
["x]zp or *zp* *zP*
["x]zP Like "p" and "P", except without adding trailing spaces
when pasting a block. Thus the inserted text will not
always be a rectangle. Especially useful in
["x]zP Like "p" and "P", except without adding trailing
spaces when pasting a block. Thus the inserted text
will not always be a rectangle. Especially useful in
combination with |v_zy|.
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: |%|,
|(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|.
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
mapped. E.g. |%| is mapped by the matchit plugin.
used as well if the delete is within a line. Note that these characters may
be mapped. E.g. |%| is mapped by the matchit plugin.
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
contents of register 9.
@@ -1566,8 +1566,8 @@ type of comment string. A part consists of:
{digits}
When together with 's' or 'e': add {digit} amount of offset to an
automatically inserted middle or end comment leader. The offset begins
from a left alignment. See below for more details.
automatically inserted middle or end comment leader. The offset
begins from a left alignment. See below for more details.
-{digits}
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
:set comments=sr:/***,m:**,ex-2:******/
>
/*** ~
**<--right aligned from "r" flag ~
** ~
offset 2 spaces for the "-2" flag-->** ~
******/ ~
/***
**<--right aligned from "r" flag
**
offset 2 spaces for the "-2" flag-->**
******/
In this case, the first comment was typed, then return was pressed 4 times,
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.
Reindenting using a different method like |gq| or |=| will not consult
alignment flags either. The same behaviour can be defined in those other
formatting options. One consideration is that 'cindent' has additional options
for context based indenting of comments but cannot replicate many three piece
indent alignments. However, 'indentexpr' has the ability to work better with
three piece comments.
formatting options. One consideration is that 'cindent' has additional
options for context based indenting of comments but cannot replicate many
three piece indent alignments. However, 'indentexpr' has the ability to work
better with three piece comments.
Other examples: >
"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
is when the 'a' flag is present. |auto-format|
Note that 'textwidth' can be non-zero even if Vim never performs auto-wrapping;
'textwidth' is still useful for formatting with "gq".
Note that 'textwidth' can be non-zero even if Vim never performs
auto-wrapping; 'textwidth' is still useful for formatting with "gq".
If the 'comments' option includes "/*", "*" and/or "*/", then Vim has some
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 current file name
'#' the alternate file name
"*" the clipboard contents (X11: primary selection)
"*" the clipboard contents (X11: primary
selection)
'+' the clipboard contents
'/' the last search pattern
':' 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.
*c_CTRL-N*
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*
CTRL-P After using 'wildchar' which got multiple matches, go to
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
different way. The '!' should be placed immediately after the command, without
any blanks in between. If you insert blanks the '!' will be seen as an
argument for the command, which has a different meaning. For example:
different way. The '!' should be placed immediately after the command,
without any blanks in between. If you insert blanks the '!' will be seen as
an argument for the command, which has a different meaning. For example:
:w! name write the current buffer to file "name", overwriting
any existing file
: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*
*:_%:* *::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>",
"<afile>" or "<abuf>". They are also used with the |fnamemodify()| function.
The file name modifiers can be used after "%", "#", "#n", "<cfile>",
"<script>", "<afile>" or "<abuf>". They are also used with the |fnamemodify()|
function.
These modifiers can be given, in this order:
:p Make file name a full path. Must be the first modifier. Also
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.
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,
it needs to be preceded by a backslash. Therefore you need to use "/\$home"
for the file "$home" in the root directory. A few examples:
to avoid a file name like "$home" to be interpreted as an environment
variable, it needs to be preceded by a backslash. Therefore you need to use
"/\$home" for the file "$home" in the root directory. A few examples:
FILE NAME INTERPRETED AS ~
$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
David Leonard Port of Python extensions to Unix
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
Paul Moore Python interface extensions, many patches
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
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
and set breakpoints, if you like. Reproduce your crash. WinDbg should open the
source file at the point of the crash. Using the View menu, you can examine
the call stack, local variables, watch windows, and so on.
use Source File Path on the File menu. You can now open source files in
WinDbg and set breakpoints, if you like. Reproduce your crash. WinDbg should
open the source file at the point of the crash. Using the View menu, you can
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
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.
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
|debug-windbg| to set the Symbol File Path.
In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions
in |debug-windbg| to set the Symbol File Path.
*get-ms-debuggers*
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
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
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
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
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
strange to avoid accidentally overwriting existing files. If you prefer ".bak"
change the 'backupext' option. The backup file can be placed in another
directory by setting 'backupdir'.
strange to avoid accidentally overwriting existing files. If you prefer
".bak" change the 'backupext' option. The backup file can be placed in
another directory by setting 'backupdir'.
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
@@ -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!!!
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
aborted. If you used ":wq" or "ZZ" Vim will not exit, you will get another
If you hit 'y' Vim will continue writing the file. If you hit 'n' the write
is aborted. If you used ":wq" or "ZZ" Vim will not exit, you will get another
chance to write the file.
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
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
differences (the "diff" program can be used for this).
other person should be merged. Write the file under another name and check
for differences (the "diff" program can be used for this).
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
which version of the file you want to keep.
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
second. Use `has('nanotime')` to check if sub-second time stamp checks are
available.
usually sub-second. With old file systems and on MS-Windows it is normally
one second. Use `has('nanotime')` to check if sub-second time stamp checks
are available.
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
@@ -1624,8 +1624,8 @@ There are three different types of searching:
- It ONLY matches directories.
- It matches up to 30 directories deep by default, so you can use it to
search an entire directory tree
- The maximum number of levels matched can be given by appending a number
to "**".
- The maximum number of levels matched can be given by appending a
number to "**".
Thus '/usr/**2' can match: >
/usr
/usr/include

View File

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

View File

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

View File

@@ -365,8 +365,8 @@ color. E.g.
Column heading ~
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
differently.
line starting from the first column. The section separator line is
highlighted differently.
*help-codeblock*
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*
:[range]perldo {cmd} Execute perl command {cmd} for each line in the[range],
with $_ being set to the test of each line in turn,
without a trailing <EOL>. In addition to $_, $line and
$linenr is also set to the line content and line number
respectively. Setting $_ will change the text, but note
that it is not possible to add or delete lines using
this command.
without a trailing <EOL>. In addition to $_, $line
and $linenr is also set to the line content and line
number respectively. Setting $_ will change the text,
but note that it is not possible to add or delete
lines using this command.
The default for [range] is the whole file: "1,$".
Examples:

View File

@@ -281,8 +281,8 @@ vim.options *python-options*
getting items) providing a read-write access to global options.
Note: unlike |:set| this provides access only to global options. You
cannot use this object to obtain or set local options' values or
access local-only options in any fashion. Raises KeyError if no global
option with such name exists (i.e. does not raise KeyError for
access local-only options in any fashion. Raises KeyError if no
global option with such name exists (i.e. does not raise KeyError for
|global-local| options and global only options, but does for window-
and buffer-local ones). Use |python-buffer| 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*
Input (via sys.stdin, including input() and raw_input()) is not
supported, and may cause the program to crash. This should probably be
fixed.
supported, and may cause the program to crash. This should probably
be fixed.
*python3-directory* *pythonx-directory*
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*
String constant used in conjunction with vim path hook. If path hook
installed by vim is requested to handle anything but path equal to
vim.VIM_SPECIAL_PATH constant it raises ImportError. In the only other
case it uses special loader.
vim.VIM_SPECIAL_PATH constant it raises ImportError. In the only
other case it uses special loader.
Note: you must not use value of this constant directly, always use
vim.VIM_SPECIAL_PATH object.
@@ -390,7 +390,8 @@ vim._get_paths *python-_get_paths*
==============================================================================
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|)
- from indexing vim.buffers (|python-buffers|)
- 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,
including indexing, index assignment, slicing and slice assignment, work as
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
from b. In particular, "b[:] = None" deletes the whole of the buffer, whereas
"b = None" merely updates the variable b, with no effect on the buffer.
string (list of strings). This has one unusual consequence - b[:] is
different from b. In particular, "b[:] = None" deletes the whole of the
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
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 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|)
- from indexing vim.windows (|python-windows|)
- 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*
:[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the
[range], with $_ being set to the text of each line in
turn, without a trailing <EOL>. Setting $_ will change
the text, but note that it is not possible to add or
delete lines using this command.
turn, without a trailing <EOL>. Setting $_ will
change the text, but note that it is not possible to
add or delete lines using this command.
The default for [range] is the whole file: "1,$".
*:rubyfile* *:rubyf*
:rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as
`:ruby load 'file'`, but allows file name completion.
:rubyf[ile] {file} Execute the Ruby script in {file}. This is the same
as `:ruby load 'file'`, but allows file name completion.
Executing Ruby commands is not possible in the |sandbox|.
@@ -127,8 +127,8 @@ Class Methods:
current Returns the current buffer object.
count Returns the number of buffers.
self[{n}] Returns the buffer object for the number {n}. The first number
is 0.
self[{n}] Returns the buffer object for the number {n}. The first
number is 0.
Methods:
@@ -157,8 +157,8 @@ Class Methods:
current Returns the current window object.
count Returns the number of windows.
self[{n}] Returns the window object for the number {n}. The first number
is 0.
self[{n}] Returns the window object for the number {n}. The first
number is 0.
Methods:

View File

@@ -43,7 +43,8 @@ These five options control C program indenting:
'cinkeys' Specifies which keys trigger reindenting in insert mode.
'cinoptions' Sets your preferred indent style.
'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
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,
interface, associate, block, enum, critical, and change team constructs are
indented. The indenting of subroutines, functions, modules, and program blocks
is optional. Comments, labeled statements, and continuation lines are indented
if the Fortran is in free source form, whereas they are not indented if the
Fortran is in fixed source form because of the left margin requirements. Hence
manual indent corrections will be necessary for labeled statements and
continuation lines when fixed source form is being used. For further
discussion of the method used for the detection of source format see
indented. The indenting of subroutines, functions, modules, and program
blocks is optional. Comments, labeled statements, and continuation lines are
indented if the Fortran is in free source form, whereas they are not indented
if the Fortran is in fixed source form because of the left margin
requirements. Hence manual indent corrections will be necessary for labeled
statements and continuation lines when fixed source form is being used. For
further discussion of the method used for the detection of source format see
|ft-fortran-syntax|.
Do loops ~
@@ -1018,8 +1019,8 @@ Indent after a nested paren: >
Indent for a continuation line: >
let g:python_indent.continue = 'shiftwidth() * 2'
By default, the closing paren on a multiline construct lines up under the first
non-whitespace character of the previous line.
By default, the closing paren on a multiline construct lines up under the
first non-whitespace character of the previous line.
If you prefer that it's lined up under the first character of the line that
starts the multiline construct, reset this key: >
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);
Full-line comments (lines that begin with "--") are indented to be aligned with
the very previous line's comment, PROVIDED that a whitespace follows after
"--".
Full-line comments (lines that begin with "--") are indented to be aligned
with the very previous line's comment, PROVIDED that a whitespace follows
after "--".
For example: >
@@ -1244,9 +1245,9 @@ results in: >
Notice that "--debug_code:" does not align with "-- comment 2"
because there is no whitespace that follows after "--" in "--debug_code:".
Given the dynamic nature of indenting comments, indenting should be done TWICE.
On the first pass, code will be indented. On the second pass, full-line
comments will be indented according to the correctly indented code.
Given the dynamic nature of indenting comments, indenting should be done
TWICE. On the first pass, code will be indented. On the second pass,
full-line comments will be indented according to the correctly indented code.
VIM *ft-vim-indent*

View File

@@ -542,9 +542,9 @@ extra spaces to get where you want to be.
*ins-smarttab*
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
behaves as if 'softtabstop' were set to the value of 'shiftwidth'. This option
allows the user to set 'softtabstop' to a value other than 'shiftwidth' and
still use the <Tab> key for indentation.
behaves as if 'softtabstop' were set to the value of 'shiftwidth'. This
option allows the user to set 'softtabstop' to a value other than 'shiftwidth'
and still use the <Tab> key for indentation.
==============================================================================
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).
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.
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*
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
from the sources listed in the 'complete' option, in order.
but triggered automatically. See 'autocomplete'. The menu items are
collected from the sources listed in the 'complete' option, in order.
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
@@ -1386,7 +1387,8 @@ any printable, non-white character:
Add this character and reduce the number of matches.
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
match (what was typed or longest common string).
<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:
- after $ variables name
- if variable was declared as object add "->", if tags file is available show
name of class
- if variable was declared as object add "->", if tags file is available
show name of class
- after "->" complete only function and variable names specific for given
class. To find class location and contents tags file is required. Because
PHP isn't strongly typed language user can use @var tag to declare class: >
class. To find class location and contents tags file is required.
Because PHP isn't strongly typed language user can use @var tag to declare
class: >
/* @var $myVar myClass */
$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: >
syntax list
The first thing you will notice is that there are many different syntax groups.
The PHP language can include elements from different languages like HTML,
JavaScript and many more. The syntax plugin will only include syntax groups
that begin with the filetype, "php", in this case. For example these syntax
groups are included by default with the PHP: phpEnvVar, phpIntVar,
The first thing you will notice is that there are many different syntax
groups. The PHP language can include elements from different languages like
HTML, JavaScript and many more. The syntax plugin will only include syntax
groups that begin with the filetype, "php", in this case. For example these
syntax groups are included by default with the PHP: phpEnvVar, phpIntVar,
phpFunctions.
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
can do the same things as in Insert mode, but for
each character you enter, one character of the existing
text is deleted. See |Replace-mode|.
each character you enter, one character of the
existing text is deleted. See |Replace-mode|.
If the 'showmode' option is on "-- REPLACE --" is
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 to avoid these problems.
When using a user-defined command, the command can be abbreviated. However, if
an abbreviation is not unique, an error will be issued. Furthermore, a
When using a user-defined command, the command can be abbreviated. However,
if an abbreviation is not unique, an error will be issued. Furthermore, a
built-in command will always take precedence.
Example: >
@@ -1279,8 +1279,8 @@ It is recommended that full names for user-defined commands are used in
scripts.
:com[mand] *:com* *:command*
List all user-defined commands. When listing commands,
the characters in the first columns are:
List all user-defined commands. When listing
commands, the characters in the first columns are:
! Command has the -bang attribute
" Command has the -register attribute
| Command has the -bar attribute
@@ -1329,10 +1329,10 @@ See |:verbose-cmd| for more information.
Command attributes ~
*command-attributes*
User-defined commands are treated by Nvim just like any other Ex commands. 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
command's attributes, which are specified when the command is defined.
User-defined commands are treated by Nvim just like any other Ex commands.
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 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
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)
The function need not use all these arguments. The function should provide the
completion candidates as the return value.
The function need not use all these arguments. The function should provide
the completion candidates as the return value.
For the "custom" argument, the function should return the completion
candidates one per line in a newline separated string.
@@ -1791,9 +1791,9 @@ A more substantial example: >
:endfunction
:command -nargs=+ -complete=command Allargs call Allargs(<q-args>)
The command Allargs takes any Vim command(s) as argument and executes it on all
files in the argument list. Usage example (note use of the "e" flag to ignore
errors and the "update" command to write modified buffers): >
The command Allargs takes any Vim command(s) as argument and executes it on
all files in the argument list. Usage example (note use of the "e" flag to
ignore errors and the "update" command to write modified buffers): >
:Allargs %s/foo/bar/ge|update
This will invoke: >
: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*
This file explains what characters are available in UTF-8 and CP1255 encodings,
and what the keymaps are to get those characters:
This file explains what characters are available in UTF-8 and CP1255
encodings, and what the keymaps are to get those characters:
glyph encoding keymap ~
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.
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
Top, 'b' for Bottom, etc.. Lowercase marks are restored when using undo and
redo.
deletes the lines from the cursor position to mark 't'. Hint: Use mark 't'
for Top, 'b' for Bottom, etc.. Lowercase marks are restored when using undo
and redo.
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
@@ -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
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
you can move through a tree of jump locations. When going back up a branch and
then down another branch, CTRL-O still takes you further up the tree.
you can move through a tree of jump locations. When going back up a branch
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
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
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
is also surrounded with '{' and '}'. This applies to the Java language. The
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
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* *[/*
[* 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)
local to window
Every wrapped line will continue visually indented (same amount of
space as the beginning of that line), thus preserving horizontal blocks
of text.
space as the beginning of that line), thus preserving horizontal
blocks of text.
*'breakindentopt'* *'briopt'*
'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
t same as "]"
f scan the buffer names (as opposed to buffer contents)
F{func} call the function {func}. Multiple "F" flags may be specified.
Refer to |complete-functions| for details on how the function
is invoked and what it should return. The value can be the
name of a function or a |Funcref|. For |Funcref| values,
spaces must be escaped with a backslash ('\'), and commas with
double backslashes ('\\') (see |option-backslash|).
F{func} call the function {func}. Multiple "F" flags may be
specified. Refer to |complete-functions| for details on how
the function is invoked and what it should return. The value
can be the name of a function or a |Funcref|. For |Funcref|
values, spaces must be escaped with a backslash ('\'), and
commas with double backslashes ('\\') (see |option-backslash|).
Unlike other sources, functions can provide completions
starting from a non-keyword character before the cursor, and
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
Makefile with 'noshellslash' on MS-Windows.
- 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
'shellslash'.
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,
since changing the buffer text is not allowed.
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' 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' boolean (default off)
global
When off, setting 'langmap' does not apply to characters resulting from
a mapping. If setting 'langmap' disables some of your mappings, make
sure this option is off.
When off, setting 'langmap' does not apply to characters resulting
from a mapping. If setting 'langmap' disables some of your mappings,
make sure this option is off.
*'laststatus'* *'ls'*
'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
typed. Also, updating the window title is postponed. To force an
update use |:redraw|.
This may occasionally cause display errors. It is only meant to be set
temporarily when performing an operation where redrawing may cause
This may occasionally cause display errors. It is only meant to be
set temporarily when performing an operation where redrawing may cause
flickering or cause a slowdown.
*'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
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
enabled. See also |ins-expandtab| ans user manual section |30.5| for
in-depth explanations.

View File

@@ -66,9 +66,9 @@ path.
Nvim will also load ftdetect files, if there are any.
Note that the files under "pack/foo/opt" are not loaded automatically, only the
ones under "pack/foo/start". See |pack-add| below for how the "opt" directory
is used.
Note that the files under "pack/foo/opt" are not loaded automatically, only
the ones under "pack/foo/start". See |pack-add| below for how the "opt"
directory is used.
Loading packages automatically will not happen if loading plugins is disabled,
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
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
`:packadd`.
package with optional plugins, and tell the user to add the preferred ones
with `:packadd`.
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

View File

@@ -274,9 +274,9 @@ When searching backwards, searching starts at the start of the line, using the
cursor position is used.
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,
unless the 't' flag is present in 'cpoptions'. The search pattern is always
put in the search history.
for. In Vim this is not done, the previous search pattern is still
remembered, unless the 't' flag is present in 'cpoptions'. The search pattern
is always put in the search history.
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
@@ -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'.
- If two characters in the sequence are separated by '-', this is
shorthand for the full list of ASCII characters between them. E.g.,
"[0-9]" matches any decimal digit. If the starting character exceeds
the ending character, e.g. [c-a], E944 occurs. Non-ASCII characters
can be used, but the character values must not be more than 256 apart
in the old regexp engine. For example, searching by [\u3000-\u4000]
after setting re=1 emits a E945 error. Prepending \%#=2 will fix it.
"[0-9]" matches any decimal digit. If the starting character
exceeds the ending character, e.g. [c-a], E944 occurs. Non-ASCII
characters can be used, but the character values must not be more
than 256 apart in the old regexp engine. For example, searching by
[\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
belonging to that character class. The following character classes
are supported:

View File

@@ -75,9 +75,9 @@ processing a quickfix or location list command, it will be aborted.
*:cc*
:cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
:[nr]cc[!] error is displayed again. Without [!] this doesn't
work when jumping to another buffer, the current buffer
has been changed, there is the only window for the
buffer and both 'hidden' and 'autowrite' are off.
work when jumping to another buffer, the current
buffer has been changed, there is the only window for
the buffer and both 'hidden' and 'autowrite' are off.
When jumping to another buffer with [!] any changes to
the current buffer are lost, unless 'hidden' is set or
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
is displayed. Assumes that the entries in a quickfix
list are sorted by their buffer number and line
number. If there are multiple errors on the same line,
then only the first entry is used. If [count] exceeds
the number of entries above the current line, then the
first error in the file is selected.
number. If there are multiple errors on the same
line, then only the first entry is used. If [count]
exceeds the number of entries above the current line,
then the first error in the file is selected.
*:lab* *:labove*
:[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[ist] [from] [, [to]]
List all errors that are valid |quickfix-valid|.
If numbers [from] and/or [to] are given, the respective
range of errors is listed. A negative number counts
from the last error backwards, -1 being the last error.
If numbers [from] and/or [to] are given, the
respective range of errors is listed. A negative
number counts from the last error backwards, -1 being
the last error.
The |:filter| command can be used to display only the
quickfix entries matching a supplied pattern. The
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.
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
'grepprg' if:
numbers). You can change this with the 'grepprg' option. You will need to
set 'grepprg' if:
a) You are using a program that isn't called "grep"
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
variable to |v:true|.
The associated project name is included in each error and warning. To suppress
the project name, set the g:dotnet_show_project_file variable to |v:false|.
The associated project name is included in each error and warning. To
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: >
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"
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
compiler sets 'errorformat' for `*TeX` output and leaves 'makeprg' untouched. If
neither "Makefile" nor "makefile" is found, the compiler will not use make.
compiler sets 'errorformat' for `*TeX` output and leaves 'makeprg' untouched.
If neither "Makefile" nor "makefile" is found, the compiler will not use make.
You can force the compiler to ignore makefiles by defining
b:tex_ignore_makefile or g:tex_ignore_makefile variable (they are checked for
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.
*g:typst_cmd*
By default Vim will use "typst" as the command to run the Typst compiler. This
can be changed by setting the |g:typst_cmd| variable: >
By default Vim will use "typst" as the command to run the Typst compiler.
This can be changed by setting the |g:typst_cmd| variable: >
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
message. See |errorformat-javac| for a useful example.
The "%s" conversion specifies the text to search for, to locate the error line.
The text is used as a literal string. The anchors "^" and "$" are added to
the text to locate the error line exactly matching the search text and the
text is prefixed with the "\V" atom to make it "very nomagic". The "%s"
conversion can be used to locate lines without a line number in the error
The "%s" conversion specifies the text to search for, to locate the error
line. The text is used as a literal string. The anchors "^" and "$" are
added to the text to locate the error line exactly matching the search text
and the text is prefixed with the "\V" atom to make it "very nomagic". The
"%s" conversion can be used to locate lines without a line number in the error
output. Like the output of the "grep" shell command.
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.
When using character classes in expressions (see |/\i| for an overview),
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
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
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
under the current directory tree. The file path may need to be simplified to a
common parent directory.
under the current directory tree. The file path may need to be simplified to
a common parent directory.
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

View File

@@ -163,11 +163,11 @@ Q Repeat the last recorded register [count] times.
See |visual-repeat|, |default-mappings|.
*:@*
:[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an Ex
command. First set cursor at line [addr] (default is
current line). When the last line in the register does
not have a <CR> it will be added automatically when
the 'e' flag is present in 'cpoptions'.
:[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an
Ex command. First set cursor at line [addr] (default
is current line). When the last line in the register
does not have a <CR> it will be added automatically
when the 'e' flag is present in 'cpoptions'.
For ":@=" the last used expression is used. The
result of evaluating the expression is executed as an
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
|sign_place()| function. Each sign identifier should be a unique number (per
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
allocate the next available identifier.
sign. The |sign_place()| function can be called with a zero sign identifier
to allocate the next available identifier.
*sign-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 assigned a default priority of 10,
unless specified otherwise by the sign definition. To assign a
different priority value, use "priority={prio}" to specify a
unless specified otherwise by the sign definition. To assign
a different priority value, use "priority={prio}" to specify a
value. The priority is used to determine the sign that is
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.
: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}
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.
:sig[n] unplace
Remove a placed sign at the cursor position. If multiple signs
are placed in the line, then only one is removed.
Remove a placed sign at the cursor position. If multiple
signs are placed in the line, then only one is removed.
:sig[n] unplace group={group}
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
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
not match either.
position will not match. When some of the other letters are upper-case it
will not match either.
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
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 slash in the word put a backslash before it: "TCP\/IP". In the rare case
you want to use a backslash inside a word you need to use two backslashes.
a word. Thus "TCP/IP" is not a word but "TCP" with the flags "IP". To
include a slash in the word put a backslash before it: "TCP\/IP". In the rare
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.

View File

@@ -997,8 +997,8 @@ has marks for.
*shada-file-marks*
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
(when exiting or with the |:wshada| command), '0 is set to the current cursor
position and file. The old '0 is moved to '1, '1 to '2, etc. This
(when exiting or with the |:wshada| command), '0 is set to the current
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
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

View File

@@ -397,9 +397,9 @@ version 2.2.3.
ASSEMBLY *asm68k* *ft-asm-syntax* *ft-asmh8300-syntax* *ft-nasm-syntax*
*ft-masm-syntax* *ft-asm68k-syntax*
Files matching "*.i" could be Progress or Assembly. If the automatic detection
doesn't work for you, or you don't edit Progress at all, use this in your
startup vimrc: >
Files matching "*.i" could be Progress or Assembly. If the automatic
detection doesn't work for you, or you don't edit Progress at all, use this in
your startup vimrc: >
:let filetype_i = "asm"
Replace "asm" with the type of assembly you use.
@@ -507,8 +507,8 @@ or for Xorg colors (e.g: AliceBlue): >
BAAN *baan-syntax*
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
are supported.
for both 3 GL and 4 GL programming. Large number of standard
defines/constants are supported.
Some special violation of coding standards will be signalled when one specify
in ones |init.vim|: >
@@ -804,10 +804,10 @@ Now the syntax engine should determine the newly changed CSV delimiter.
CYNLIB *ft-cynlib-syntax*
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
or a .cpp extension, which makes it very difficult to distinguish them from a
normal C++ file. Thus, to enable Cynlib highlighting for .cc files, add this
line to your vimrc file: >
hardware modelling and simulation using C++. Typically Cynlib files have a
.cc or a .cpp extension, which makes it very difficult to distinguish them
from a normal C++ file. Thus, to enable Cynlib highlighting for .cc files,
add this line to your vimrc file: >
:let cynlib_cyntax_for_cc=1
@@ -847,9 +847,9 @@ following variables:
DART *ft-dart-syntax*
Dart is an object-oriented, typed, class defined, garbage collected language
used for developing mobile, desktop, web, and back-end applications. Dart uses
a C-like syntax derived from C, Java, and JavaScript, with features adopted
from Smalltalk, Python, Ruby, and others.
used for developing mobile, desktop, web, and back-end applications. Dart
uses a C-like syntax derived from C, Java, and JavaScript, with features
adopted from Smalltalk, Python, Ruby, and others.
More information about the language and its development environment at the
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
is main programs starting with a program statement, subroutines, function
subprograms, modules, submodules, blocks of comment lines, and block data
units. Block, interface, associate, critical, type definition, and change team
constructs will also be folded. If you also set the variable
units. Block, interface, associate, critical, type definition, and change
team constructs will also be folded. If you also set the variable
fortran_fold_conditionals with a command such as >
:let fortran_fold_conditionals=1
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*
Vim highlights all the standard elements of an email (headers, signatures,
quoted text and URLs / email addresses). In keeping with standard conventions,
signatures begin in a line containing only "--" followed optionally by
whitespaces and end with a newline.
quoted text and URLs / email addresses). In keeping with standard
conventions, signatures begin in a line containing only "--" followed
optionally by whitespaces and end with a newline.
Vim treats lines beginning with "]", "}", "|", ">" or a word followed by ">"
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
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
highlighted at the user's discretion. Users may place in their vimrc file: >
The standard set of packages' functions as supplied in Maple V release 4 may
be highlighted at the user's discretion. Users may place in their vimrc
file: >
:let mvpkg_all= 1
@@ -2332,8 +2333,8 @@ This is a list of the rules which can be used here:
- inlinecode
- inlinemath
You can customize the way concealing works. For example, if you prefer to mark
footnotes with the `*` symbol: >
You can customize the way concealing works. For example, if you prefer to
mark footnotes with the `*` symbol: >
: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
Detect and highlight definition lists. Disabling this can improve performance.
Default = 1 (i.e., enabled by default) >
Detect and highlight definition lists. Disabling this can improve
performance. Default = 1 (i.e., enabled by default) >
: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
rofi to style the rendering of the search window. The language is heavily
inspired by CSS stylesheet. Files with the following extensions are recognized
as rasi files: .rasi.
inspired by CSS stylesheet. Files with the following extensions are
recognized as rasi files: .rasi.
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
regions, >
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*
@@ -3640,8 +3642,8 @@ highlighting is to put the following line in your |vimrc|: >
WDL *wdl-syntax*
The Workflow Description Language is a way to specify data processing workflows
with a human-readable and writeable syntax. This is used a lot in
The Workflow Description Language is a way to specify data processing
workflows with a human-readable and writeable syntax. This is used a lot in
bioinformatics. More info on the spec can be found here:
https://github.com/openwdl/wdl

View File

@@ -466,8 +466,8 @@ would otherwise go unnoticed. Example: >
:$d|/tag-function-name/
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,
unless the 't' flag is present in 'cpoptions'.
for. In Vim this is not done, the previous search pattern is still
remembered, unless the 't' flag is present in 'cpoptions'.
*tags-option*
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:
name Name of the tag.
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
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

View File

@@ -658,8 +658,8 @@ If there is no g:termdebug_config you can use: >vim
Change default signs ~
*termdebug_signs*
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
as "F+", due to we really only have two screen cells for the sign.
represent breakpoints. If it is greater than "0xFF", then it will be
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
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
|i_CTRL-E|.
Also consider setting 'scrolloff' to a larger value, so that you can always see
some context around the cursor. If 'scrolloff' is bigger than half the window
height, the cursor will always be in the middle and the text is scrolled when
the cursor is moved up/down.
Also consider setting 'scrolloff' to a larger value, so that you can always
see some context around the cursor. If 'scrolloff' is bigger than half the
window height, the cursor will always be in the middle and the text is
scrolled when the cursor is moved up/down.
==============================================================================
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'
and the use of `:setlocal` to change only the local option (which takes
precedence over the corresponding global option value). Saving the option value
via the use of `&undolevels` is unpredictable; it reads either the local value
(if one has been set) or the global value (otherwise). Also, if a local value
has been set, changing the option via `:set undolevels` will change both the
global and local values, requiring extra work to save and restore both values.
precedence over the corresponding global option value). Saving the option
value via the use of `&undolevels` is unpredictable; it reads either the local
value (if one has been set) or the global value (otherwise). Also, if a local
value has been set, changing the option via `:set undolevels` will change both
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
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}
to lines that do NOT match {pattern}.
{pattern} is a Vim search pattern. Instead of enclosing
it in / any non-ID character (see 'isident') can be
used, so long as it does not appear in {pattern}.
{pattern} is a Vim search pattern. Instead of
enclosing it in / any non-ID character (see 'isident')
can be used, so long as it does not appear in
{pattern}.
Without the enclosing character the pattern cannot
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
for this facility.
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|
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
mentioned above.
\<*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
bytes: 3 for the CTRL modifier and then character "W".
character. E.g. "\<C-w>" is one character 0x17 while "\<*C-w>" is
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
encodings. Use "\u00ff" to store character 255 correctly as UTF-8.
@@ -2049,7 +2049,8 @@ text...
END
< There can be multiple Vim expressions in a single line
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} cannot start with a lower case character.

View File

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

View File

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

View File

@@ -597,7 +597,11 @@ function vim.fn.bufname(buf) end
--- above.
--- If the buffer doesn't exist, -1 is returned. Or, if the
--- {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
--- let last_buffer = bufnr("$")
--- <The result is a Number, which is the highest buffer number
@@ -992,10 +996,11 @@ function vim.fn.cmdcomplete_info() end
--- @return integer
function vim.fn.col(expr, winid) end
--- Set the matches for Insert mode completion.
--- Can only be used in Insert mode. You need to use a mapping
--- with CTRL-R = (see |i_CTRL-R|). It does not work after CTRL-O
--- or with an expression mapping.
--- Set the matches for Insert mode completion. Can only be used
--- in Insert mode. Typically invoked from a mapping with
--- CTRL-R = (see |i_CTRL-R|), but may also be called from a
--- |<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
--- text start. The text up to the cursor is the original text
--- that will be replaced by the matches. Use col('.') for an
@@ -1056,7 +1061,8 @@ function vim.fn.complete_check() end
--- See |pumvisible()|.
--- items List of all completion candidates. Each item
--- is a dictionary containing the entries "word",
--- "abbr", "menu", "kind", "info" and "user_data".
--- "abbr", "menu", "kind", "info" and
--- "user_data".
--- See |complete-items|.
--- matches Same as "items", but only returns items that
--- are matching current query. If both "matches"
@@ -2182,8 +2188,8 @@ function vim.fn.filewritable(file) end
--- or a new |Blob| or |String|.
--- When an error is encountered while evaluating {expr2} no
--- further items in {expr1} are processed.
--- When {expr2} is a Funcref errors inside a function are ignored,
--- unless it was defined with the "abort" flag.
--- When {expr2} is a Funcref errors inside a function are
--- ignored, unless it was defined with the "abort" flag.
---
--- @param expr1 string|table
--- @param expr2 string|function
@@ -2455,8 +2461,8 @@ function vim.fn.foldtextresult(lnum) end
--- Returns {expr1} in all cases.
--- When an error is encountered while executing {expr2} no
--- further items in {expr1} are processed.
--- When {expr2} is a Funcref errors inside a function are ignored,
--- unless it was defined with the "abort" flag.
--- When {expr2} is a Funcref errors inside a function are
--- ignored, unless it was defined with the "abort" flag.
---
--- @param expr1 string|table
--- @param expr2 string|function
@@ -2510,8 +2516,8 @@ function vim.fn.funcref(name, arglist, dict) end
--- same function.
---
--- When {arglist} or {dict} is present this creates a partial.
--- That means the argument list and/or the dictionary is stored in
--- the Funcref and will be used when the Funcref is called.
--- That means the argument list and/or the dictionary is stored
--- in the Funcref and will be used when the Funcref is called.
---
--- The arguments are passed to the function in front of other
--- arguments, but after any argument from |method|. Example: >vim
@@ -3664,15 +3670,16 @@ function vim.fn.getpos(expr) end
--- If not present, set to "".
--- id quickfix list ID |quickfix-ID|. If not
--- present, set to 0.
--- idx index of the quickfix entry in the list. If not
--- present, set to 0.
--- idx index of the quickfix entry in the list. If
--- not present, set to 0.
--- items quickfix list entries. If not present, set to
--- 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
--- window. If not present, set to 0.
--- size number of entries in the quickfix list. If not
--- present, set to 0.
--- size number of entries in the quickfix list. If
--- not present, set to 0.
--- title quickfix list title text. If not present, set
--- to "".
--- 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.
--- See |getpos()| for the format of the
--- returned list.
--- matchnr current matching tag number. Used when
--- multiple matching tags are found for a
--- name.
--- matchnr current matching tag number. Used
--- when multiple matching tags are found
--- for a name.
--- tagname name of the tag
---
--- 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.
---
--- 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
--- also get filenames containing newlines correctly. Otherwise
--- the result is a String and when there are several matches,
--- they are separated by <NL> characters. Example: >vim
--- with all matching files. The advantage of using a List is,
--- you also get filenames containing newlines correctly.
--- Otherwise the result is a String and when there are several
--- matches, they are separated by <NL> characters. Example: >vim
--- echo globpath(&rtp, "syntax/c.vim", 0, 1)
--- <
--- {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()|.
--- Should be called the same number of times inputsave() is
--- 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
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
--- absolute path.
--- 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
--- are always absolute.
--- 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 are always absolute.
--- Example: >vim
--- echo isabsolutepath('/usr/share/') " 1
--- echo isabsolutepath('./foobar') " 0
@@ -5411,8 +5420,8 @@ function vim.fn.log10(expr) end
--- or a new |Blob| or |String|.
--- When an error is encountered while evaluating {expr2} no
--- further items in {expr1} are processed.
--- When {expr2} is a Funcref errors inside a function are ignored,
--- unless it was defined with the "abort" flag.
--- When {expr2} is a Funcref errors inside a function are
--- ignored, unless it was defined with the "abort" flag.
---
--- @param expr1 string|table|any[]
--- @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
--- |maparg()| or |maplist()|. A buffer mapping, when dict.buffer
--- 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
--- feature allows copying mappings from one buffer to another.
--- to ensure that the intended buffer is the current buffer.
--- This feature allows copying mappings from one buffer to
--- another.
--- The dict.mode value may restore a single mapping that covers
--- more than one mode, like with mode values of '!', ' ', "nox",
--- or 'v'. *E1276*
@@ -5779,13 +5789,13 @@ function vim.fn.matchadd(group, pattern, priority, id, dict) end
--- these:
--- - A number. This whole line will be highlighted. The first
--- line has number 1.
--- - A list with one number, e.g., [23]. The whole line with this
--- number will be highlighted.
--- - A list with two numbers, e.g., [23, 11]. The first number is
--- the line number, the second one is the column number (first
--- column is 1, the value must correspond to the byte index as
--- |col()| would return). The character at this position will
--- be highlighted.
--- - A list with one number, e.g., [23]. The whole line with
--- this number will be highlighted.
--- - A list with two numbers, e.g., [23, 11]. The first number
--- is the line number, the second one is the column number
--- (first column is 1, the value must correspond to the byte
--- index as |col()| would return). The character at this
--- position will be highlighted.
--- - A list with three numbers, e.g., [23, 11, 3]. As above, but
--- 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
--- remappable else v:false.
--- priority menu order priority |menu-priority|
--- rhs right-hand-side of the menu item. The returned
--- string has special characters translated like
--- in the output of the ":menu" command listing.
--- When the {rhs} of a menu item is empty, then
--- "<Nop>" is returned.
--- rhs right-hand-side of the menu item. The
--- returned string has special characters
--- translated like in the output of the ":menu"
--- command listing. When the {rhs} of a menu
--- item is empty, then "<Nop>" is returned.
--- script v:true if script-local remapping of {rhs} is
--- allowed else v:false. See |:menu-script|.
--- 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
--- most other places it always returns "c" or "n".
--- 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
--- the leading character(s).
--- be added. It's better not to compare the whole string but
--- only the leading character(s).
--- Also see |visualmode()|.
---
--- @param expr? any
@@ -6620,8 +6630,8 @@ function vim.fn.prevnonblank(lnum) end
--- % [pos-argument] [flags] [field-width] [.precision] type
---
--- pos-argument
--- At most one positional argument specifier. These
--- take the form {n$}, where n is >= 1.
--- At most one positional argument specifier. These take
--- the form {n$}, where n is >= 1.
---
--- flags
--- Zero or more of the following flags:
@@ -6812,9 +6822,9 @@ function vim.fn.prevnonblank(lnum) end
--- "Bram", "Moolenaar")
--- < In Belgium, vim's creator's name is: Moolenaar Bram
---
--- Width (and precision) can be specified using the '*' specifier.
--- In this case, you must specify the field width position in the
--- argument list. >vim
--- Width (and precision) can be specified using the '*'
--- specifier. In this case, you must specify the field width
--- position in the argument list. >vim
---
--- echo printf("%1$*2$.*3$d", 1, 2, 3)
--- < 001 >vim
@@ -8264,8 +8274,8 @@ function vim.fn.setfperm(fname, mode) end
--- converted to a String. When {text} is an empty List then
--- nothing is changed and FALSE is returned.
---
--- If this succeeds, FALSE is returned. If this fails (most likely
--- because {lnum} is invalid) TRUE is returned.
--- If this succeeds, FALSE is returned. If this fails (most
--- likely because {lnum} is invalid) TRUE is returned.
---
--- Example: >vim
--- 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
--- {what}.
--- *setqflist-what*
--- When {what} is not present, the items in {list} are used. Each
--- item must be a dictionary. Non-dictionary items in {list} are
--- ignored. Each dictionary item can contain the following
--- entries:
--- When {what} is not present, the items in {list} are used.
--- Each item must be a dictionary. Non-dictionary items in
--- {list} are ignored. Each dictionary item can contain the
--- following entries:
---
--- bufnr buffer number; must be the number of a valid
--- buffer
@@ -8449,9 +8459,9 @@ function vim.fn.setpos(expr, list) end
--- See |quickfix-parse|
--- id quickfix list identifier |quickfix-ID|
--- idx index of the current entry in the quickfix
--- list specified by "id" or "nr". If set to '$',
--- then the last entry in the list is set as the
--- current entry. See |quickfix-index|
--- list specified by "id" or "nr". If set to
--- '$', then the last entry in the list is set as
--- the current entry. See |quickfix-index|
--- items list of quickfix entries. Same as the {list}
--- argument.
--- 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.
--- title quickfix list title text. See |quickfix-title|
--- Unsupported keys in {what} are ignored.
--- If the "nr" item is not present, then the current quickfix list
--- is modified. When creating a new quickfix list, "nr" can be
--- set to a value one greater than the quickfix stack size.
--- If the "nr" item is not present, then the current quickfix
--- list is modified. When creating a new quickfix list, "nr" can
--- be set to a value one greater than the quickfix stack size.
--- When modifying a quickfix list, to guarantee that the correct
--- list is modified, "id" should be used instead of "nr" to
--- specify the list.
@@ -8521,8 +8531,8 @@ function vim.fn.setqflist(list, action, what) end
---
--- *E883*
--- Note: you may not use |List| containing more than one item to
--- set search and expression registers. Lists containing no
--- items act like empty strings.
--- set search and expression registers. Lists containing
--- no items act like empty strings.
---
--- Examples: >vim
--- call setreg(v:register, \@*)
@@ -8700,10 +8710,10 @@ function vim.fn.shellescape(string, special) end
--- endif
--- <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 the
--- 'vartabstop' feature. If no {col} argument is given, column 1
--- will be assumed.
--- for which to return the 'shiftwidth' value. This matters for
--- the 'vartabstop' feature. If the 'vartabstop' setting is
--- enabled and no {col} argument is given, column 1 will be
--- assumed.
---
--- @param col? integer
--- @return integer
@@ -8816,8 +8826,8 @@ function vim.fn.sign_getdefined(name) end
--- lnum select signs placed in this line. For the use
--- of {lnum}, see |line()|.
--- If {group} is "*", then signs in all the groups including the
--- global group are returned. If {group} is not supplied or is an
--- empty string, then only signs in the global group are
--- global group are returned. If {group} is not supplied or is
--- an empty string, then only signs in the global group are
--- returned. If no arguments are supplied, then signs in the
--- global group placed in all the buffers are returned.
--- See |sign-group|.
@@ -8895,8 +8905,8 @@ function vim.fn.sign_jump(id, group, buf) end
--- similar to the |:sign-place| command.
---
--- If the sign identifier {id} is zero, then a new identifier is
--- allocated. Otherwise the specified number is used. {group} is
--- the sign group name. To use the global sign group, use an
--- allocated. Otherwise the specified number is used. {group}
--- is the sign group name. To use the global sign group, use an
--- empty string. {group} functions as a namespace for {id}, thus
--- two groups can use the same IDs. Refer to |sign-identifier|
--- 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.
---
--- When {how} is given and it is 'l' then the current collation
--- locale is used for ordering. Implementation details: strcoll()
--- is used to compare strings. See |:language| check or set the
--- collation locale. |v:collate| can also be used to check the
--- current locale. Sorting using the locale typically ignores
--- case. Example: >vim
--- locale is used for ordering. Implementation details:
--- strcoll() is used to compare strings. See |:language| check
--- or set the collation locale. |v:collate| can also be used to
--- check the current locale. Sorting using the locale typically
--- ignores case. Example: >vim
--- " ö is sorted similarly to o with English locale.
--- language collate en_US.UTF8
--- 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
--- 'tabstop' and 'display'.
--- 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.
--- 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
--- cell, alternatively use |strdisplaywidth()|.
--- 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.
--- Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
---
@@ -10220,10 +10232,10 @@ function vim.fn.synstack(lnum, col) end
function vim.fn.system(cmd, input) end
--- Same as |system()|, but returns a |List| with lines (parts of
--- output separated by NL) with NULs transformed into NLs. Output
--- is the same as |readfile()| will output with {binary} argument
--- set to "b", except that a final newline is not preserved,
--- unless {keepempty} is non-zero.
--- output separated by NL) with NULs transformed into NLs.
--- Output is the same as |readfile()| will output with {binary}
--- argument set to "b", except that a final newline is not
--- preserved, unless {keepempty} is non-zero.
--- Note that on MS-Windows you may get trailing CR characters.
---
--- 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.
---
--- Returns -1 if the arguments are invalid or if there are less
--- than {idx} bytes in {string}. If there are exactly {idx} bytes
--- the length of the string in UTF-16 code units is returned.
--- than {idx} bytes in {string}. If there are exactly {idx}
--- bytes the length of the string in UTF-16 code units is
--- returned.
---
--- See |byteidx()| and |byteidxcomp()| for getting the byte index
--- 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
--- 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
--- window number or |window-ID|. A positive {offset} moves down
--- and a negative {offset} moves up. Moving a window's status
--- line will change the height of the window and the height of
--- other windows adjacent to the status line. The magnitude of
--- movement may be smaller than specified (e.g., as a consequence
--- of maintaining 'winminheight'). Returns TRUE if the window can
--- be found and FALSE otherwise.
--- {offset} rows, as if being dragged by the mouse. {nr} can be
--- a window number or |window-ID|. A positive {offset} moves
--- down and a negative {offset} moves up. Moving a window's
--- status line will change the height of the window and the
--- height of other windows adjacent to the status line. The
--- magnitude of movement may be smaller than specified (e.g., as
--- a consequence of maintaining 'winminheight'). Returns TRUE if
--- the window can be found and FALSE otherwise.
--- Only works for the current tab page.
---
--- @param nr integer
@@ -11172,7 +11185,8 @@ function vim.fn.winrestcmd() end
--- This will only set the curswant value (the column the cursor
--- wants to move on vertical movements) of the cursor to column 5
--- (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 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 = ...
--- Old value of the option. Valid while executing an `OptionSet`
--- autocommand. Depending on the command used for setting and the
--- kind of option this is either the local old value or the
--- autocommand. Depending on the command used for setting and
--- the kind of option this is either the local old value or the
--- global old value.
--- @type any
vim.v.option_old = ...

View File

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

View File

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

View File

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