aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/autocmd.txt16
-rw-r--r--runtime/doc/change.txt8
-rw-r--r--runtime/doc/cmdline.txt1
-rw-r--r--runtime/doc/digraph.txt13
-rw-r--r--runtime/doc/eval.txt42
-rw-r--r--runtime/doc/help.txt29
-rw-r--r--runtime/doc/indent.txt27
-rw-r--r--runtime/doc/index.txt5
-rw-r--r--runtime/doc/map.txt20
-rw-r--r--runtime/doc/message.txt8
-rw-r--r--runtime/doc/motion.txt4
-rw-r--r--runtime/doc/options.txt30
-rw-r--r--runtime/doc/pattern.txt10
-rw-r--r--runtime/doc/pi_matchit.txt366
-rw-r--r--runtime/doc/quickfix.txt25
-rw-r--r--runtime/doc/repeat.txt5
-rw-r--r--runtime/doc/sign.txt9
-rw-r--r--runtime/doc/spell.txt17
-rw-r--r--runtime/doc/syntax.txt84
-rw-r--r--runtime/doc/tagsrch.txt4
-rw-r--r--runtime/doc/usr_05.txt58
-rw-r--r--runtime/doc/usr_11.txt2
-rw-r--r--runtime/doc/usr_41.txt30
-rw-r--r--runtime/doc/vim_diff.txt4
-rw-r--r--runtime/doc/windows.txt4
25 files changed, 281 insertions, 540 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index a3f13034a8..47afc4bd21 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -305,6 +305,7 @@ Name triggered by ~
|FuncUndefined| a user function is used but it isn't defined
|SpellFileMissing| a spell file is used but it can't be found
|SourcePre| before sourcing a Vim script
+|SourcePost| after sourcing a Vim script
|SourceCmd| before sourcing a Vim script |Cmd-event|
|VimResized| after the Vim window size changed
@@ -397,8 +398,8 @@ BufFilePost After changing the name of the current buffer
BufFilePre Before changing the name of the current buffer
with the ":file" or ":saveas" command.
*BufHidden*
-BufHidden Just after a buffer has become hidden. That
- is, when there are no longer windows that show
+BufHidden Just before a buffer becomes hidden. That is,
+ when there are no longer windows that show
the buffer, but the buffer is not unloaded or
deleted. Not used for ":qa" or ":q" when
exiting Vim.
@@ -776,13 +777,14 @@ FilterReadPre Before reading a file from a filter command.
Not triggered when 'shelltemp' is off.
*FilterWritePost*
FilterWritePost After writing a file for a filter command or
- making a diff.
+ making a diff with an external diff (see
+ DiffUpdated for internal diff).
Vim checks the pattern against the name of
the current buffer as with FilterWritePre.
Not triggered when 'shelltemp' is off.
*FilterWritePre*
FilterWritePre Before writing a file for a filter command or
- making a diff.
+ making a diff with an external diff.
Vim checks the pattern against the name of
the current buffer, not the name of the
temporary file that is the output of the
@@ -1042,8 +1044,10 @@ TermResponse After the response to t_RV is received from
anything else that takes time is involved).
*TextChanged*
TextChanged After a change was made to the text in the
- current buffer in Normal mode. That is when
- |b:changedtick| has changed.
+ current buffer in Normal mode. That is after
+ |b:changedtick| has changed (also when that
+ happened before the TextChanged autocommand
+ was defined).
Not triggered when there is typeahead or when
an operator is pending.
Careful: This is triggered very often, don't
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 912231bfcd..ee70e95ab2 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -800,7 +800,7 @@ the |substitute()| function with the following exceptions:
- magic is always set without regard to 'magic'.
- A ~ inserts a tilde literally.
- <CR> and \r inserts a carriage-return (CTRL-M).
- - \<CR> does not have a special meaning. it's just one of \x.
+ - \<CR> does not have a special meaning. It's just one of \x.
Examples: >
:s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx"
@@ -886,9 +886,9 @@ When the result is a |List| then the items are joined with separating line
breaks. Thus each item becomes a line, except that they can contain line
breaks themselves.
-The whole matched text can be accessed with "submatch(0)". The text matched
-with the first pair of () with "submatch(1)". Likewise for further
-sub-matches in ().
+The |submatch()| function can be used to obtain matched text. The whole
+matched text can be accessed with "submatch(0)". The text matched with the
+first pair of () with "submatch(1)". Likewise for further sub-matches in ().
Be careful: The separation character must not appear in the expression!
Consider using a character like "@" or ":". There is no problem if the result
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 5f4f128329..119fd924f1 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -499,7 +499,6 @@ that see the '"' as part of their argument:
:autocmd
:bufdo
:cexpr (and the like)
- :call
:cdo (and the like)
:command
:cscope (and the like)
diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt
index 95bc3722d0..953a65f125 100644
--- a/runtime/doc/digraph.txt
+++ b/runtime/doc/digraph.txt
@@ -91,11 +91,14 @@ this, you will have to type <BS> e again. To avoid this don't set the
You may have problems using Vim with characters which have a value above 128.
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
-mode. After leaving the Insert mode everything is fine. Note that fmt
-removes all characters with a value above 128 from the text being formatted.
-On some Unix systems this means you have to define the environment-variable
-LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
- setenv LC_CTYPE iso_8859_1
+mode. After leaving the Insert mode everything is fine. On some Unix systems
+this means you have to define the environment-variable LC_CTYPE. If you are
+using csh, then put the following line in your .cshrc: >
+ setenv LC_CTYPE en_US.utf8
+(or similar for a different language or country). The value must be a valid
+locale on your system, i.e. on Unix-like systems it must be present in the
+output of >
+ locale -a
==============================================================================
3. Default digraphs *digraphs-default*
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 752e368925..1a5268faf3 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -69,7 +69,7 @@ To force conversion from String to Number, add zero to it: >
To avoid a leading zero to cause octal conversion, or for using a different
base, use |str2nr()|.
- *TRUE* *FALSE*
+ *TRUE* *FALSE* *Boolean*
For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
You can also use |v:false| and |v:true|. When TRUE is returned from a
function it is the Number one, FALSE is the number zero.
@@ -92,7 +92,8 @@ Note that " " and "0" are also non-empty strings, thus considered to be TRUE.
A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
*E745* *E728* *E703* *E729* *E730* *E731*
-List, Dictionary and Funcref types are not automatically converted.
+|List|, |Dictionary|, |Funcref|, and |Blob| types are not automatically
+converted.
*E805* *E806* *E808*
When mixing Number and Float the Number is converted to Float. Otherwise
@@ -147,10 +148,10 @@ function() or funcref(). When calling the function the Dictionary and/or
arguments will be passed to the function. Example: >
let Cb = function('Callback', ['foo'], myDict)
- call Cb()
+ call Cb('bar')
This will invoke the function as if using: >
- call myDict.Callback('foo')
+ call myDict.Callback('foo', 'bar')
Note that binding a function to a Dictionary also happens when the function is
a member of the Dictionary: >
@@ -482,7 +483,7 @@ To loop over the values use the |values()| function: >
:endfor
If you want both the key and the value use the |items()| function. It returns
-a List in which each item is a List with two items, the key and the value: >
+a List in which each item is a List with two items, the key and the value: >
:for [key, value] in items(mydict)
: echo key . ': ' . value
:endfor
@@ -1408,7 +1409,9 @@ Note that this means that filetype plugins don't get a different set of script
variables for each buffer. Use local buffer variables instead |b:var|.
-Predefined Vim variables: *vim-variable* *v:var* *v:*
+PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
+ *E963*
+Some variables can be set by the user, but the type cannot be changed.
*v:beval_col* *beval_col-variable*
v:beval_col The number of the column, over which the mouse pointer is.
@@ -4696,7 +4699,7 @@ gettagstack([{nr}]) *gettagstack()*
getwinpos([{timeout}]) *getwinpos()*
The result is a list with two numbers, the result of
- getwinposx() and getwinposy() combined:
+ getwinposx() and getwinposy() combined:
[x-pos, y-pos]
{timeout} can be used to specify how long to wait in msec for
a response from the terminal. When omitted 100 msec is used.
@@ -5417,6 +5420,7 @@ len({expr}) The result is a Number, which is the length of the argument.
used, as with |strlen()|.
When {expr} is a |List| the number of items in the |List| is
returned.
+ When {expr} is a |Blob| the number of bytes is returned.
When {expr} is a |Dictionary| the number of entries in the
|Dictionary| is returned.
Otherwise an error is given.
@@ -5501,13 +5505,6 @@ line({expr}) The result is a Number, which is the line number of the file
line(".") line number of the cursor
line("'t") line number of mark t
line("'" . marker) line number of mark marker
-< *last-position-jump*
- This autocommand jumps to the last known position in a file
- just after opening it, if the '" mark is set: >
- :au BufReadPost *
- \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
- \ | exe "normal! g`\""
- \ | endif
line2byte({lnum}) *line2byte()*
Return the byte count from the start of the buffer for line
@@ -7514,9 +7511,9 @@ sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()*
list of signs placed in that buffer is returned. For the use
of {expr}, see |bufname()|. The optional {dict} can contain
the following entries:
- group select only signs in this group
- id select sign with this identifier
- lnum select signs placed in this line. For the use
+ group select only signs in this group
+ id select sign with this identifier
+ 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
@@ -7557,11 +7554,11 @@ sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()*
echo sign_getplaced("eval.c", {'lnum' : 10})
" Get sign with identifier 10 placed in a.py
- echo sign_getplaced("a.py", {'id' : 10'})
+ echo sign_getplaced("a.py", {'id' : 10})
" Get sign with id 20 in group 'g1' placed in a.py
echo sign_getplaced("a.py", {'group' : 'g1',
- \ 'id' : 20'})
+ \ 'id' : 20})
" Get a List of all the placed signs
echo sign_getplaced()
@@ -7646,7 +7643,7 @@ sign_undefine([{name}]) *sign_undefine()*
<
sign_unplace({group} [, {dict}]) *sign_unplace()*
Remove a previously placed sign in one or more buffers. This
- is similar to the |:sign-unplace()| command.
+ is similar to the |:sign-unplace| command.
{group} is the sign group name. To use the global sign group,
use an empty string. If {group} is set to '*', then all the
@@ -7936,7 +7933,8 @@ str2float({expr}) *str2float()*
as when using a floating point number in an expression, see
|floating-point-format|. But it's a bit more permissive.
E.g., "1e40" is accepted, while in an expression you need to
- write "1.0e40".
+ write "1.0e40". The hexadecimal form "0x123" is also
+ accepted, but not others, like binary or octal.
Text after the number is silently ignored.
The decimal point is always '.', no matter what the locale is
set to. A comma ends the number: "12,345.67" is converted to
@@ -8819,7 +8817,7 @@ win_getid([{win} [, {tab}]]) *win_getid()*
Get the |window-ID| for the specified window.
When {win} is missing use the current window.
With {win} this is the window number. The top window has
- number 1. Use `win_getid(winnr())` for the current window.
+ number 1.
Without {tab} use the current tab, otherwise the tab with
number {tab}. The first tab has number one.
Return zero if the window cannot be found.
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 7fcf08e2a1..68e94ef5c5 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -9,7 +9,7 @@ Close this window: Use ":q<Enter>".
Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
With the mouse: Double-click the left mouse button on a tag, e.g. |bars|.
- Jump back: Type CTRL-T or CTRL-O. Repeat to go further back.
+ Jump back: Type CTRL-O. Repeat to go further back.
Get specific help: It is possible to go directly to whatever you want help
on, by giving an argument to the |:help| command.
@@ -30,13 +30,17 @@ Get specific help: It is possible to go directly to whatever you want help
help entries for "word".
Or use ":helpgrep word". |:helpgrep|
+ Getting started: Do the Vim tutor, a 20 minute interactive training for the
+ basic commands, see |vimtutor|.
+ Read the user manual from start to end: |usr_01.txt|
+
Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only
through the help of many others. See |credits|.
------------------------------------------------------------------------------
*doc-file-list* *Q_ct*
BASIC:
|quickref| Overview of the most common commands you will use
-|tutor| 30 minutes training course for beginners
+|tutor| 20 minutes training course for beginners
|copying| About copyrights
|iccf| Helping poor children in Uganda
|sponsor| Sponsor Vim development, become a registered Vim user
@@ -106,7 +110,6 @@ Basic editing ~
|scroll.txt| scrolling the text in the window
|insert.txt| Insert and Replace mode
|change.txt| deleting and replacing text
-|indent.txt| automatic indenting for C and other languages
|undo.txt| Undo and Redo
|repeat.txt| repeating commands, Vim scripts and debugging
|visual.txt| using the Visual mode (selecting a text area)
@@ -119,30 +122,36 @@ Advanced editing ~
|pattern.txt| regexp patterns and search commands
|map.txt| key mapping and abbreviations
|tagsrch.txt| tags and special searches
-|quickfix.txt| commands for a quick edit-compile-fix cycle
|windows.txt| commands for using multiple windows and buffers
|tabpage.txt| commands for using multiple tab pages
-|syntax.txt| syntax highlighting
|spell.txt| spell checking
|diff.txt| working with two to four versions of the same file
|autocmd.txt| automatically executing commands on an event
-|filetype.txt| settings done specifically for a type of file
|eval.txt| expression evaluation, conditional commands
|fold.txt| hide (fold) ranges of lines
Special issues ~
|print.txt| printing
|remote.txt| using Vim as a server or client
+
+Programming language support ~
+|indent.txt| automatic indenting for C and other languages
+|syntax.txt| syntax highlighting
+|textprop.txt| Attaching properties to text for highlighting or other
+|filetype.txt| settings done specifically for a type of file
+|quickfix.txt| commands for a quick edit-compile-fix cycle
+|ft_ada.txt| Ada (the programming language) support
+|ft_rust.txt| Filetype plugin for Rust
+|ft_sql.txt| about the SQL filetype plugin
+
+Language support ~
|digraph.txt| list of available digraphs
|mbyte.txt| multi-byte text support
|mlang.txt| non-English language support
+|rileft.txt| right-to-left editing mode
|arabic.txt| Arabic language support and editing
|hebrew.txt| Hebrew language support and editing
|russian.txt| Russian language support and editing
-|ft_ada.txt| Ada (the programming language) support
-|ft_rust.txt| Filetype plugin for Rust
-|ft_sql.txt| about the SQL filetype plugin
-|rileft.txt| right-to-left editing mode
GUI ~
|gui.txt| Graphical User Interface (GUI)
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 6820b9c240..721aa93442 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -585,8 +585,9 @@ The basics for using flexible indenting are explained in section |30.3| of the
user manual.
If you want to write your own indent file, it must set the 'indentexpr'
-option. Setting the 'indentkeys' option is often useful. See the
-$VIMRUNTIME/indent directory for examples.
+option. Setting the 'indentkeys' option is often useful.
+See the $VIMRUNTIME/indent/README.txt file for hints.
+See the $VIMRUNTIME/indent directory for examples.
REMARKS ABOUT SPECIFIC INDENT FILES ~
@@ -599,14 +600,14 @@ the use of square and curly brackets, and otherwise by community convention.
These conventions are not universally followed, so the Clojure indent script
offers a few configurable options, listed below.
-If the current vim does not include searchpairpos(), the indent script falls
+If the current vim does not include |searchpairpos()|, the indent script falls
back to normal 'lisp' indenting, and the following options are ignored.
*g:clojure_maxlines*
-Set maximum scan distance of searchpairpos(). Larger values trade performance
-for correctness when dealing with very long forms. A value of 0 will scan
-without limits.
+Set maximum scan distance of |searchpairpos()|. Larger values trade
+performance for correctness when dealing with very long forms. A value of 0
+will scan without limits.
>
" Default
let g:clojure_maxlines = 100
@@ -932,14 +933,14 @@ given are the defaults. Note that the variables are set to an expression, so
that you can change the value of 'shiftwidth' later.
Indent after an open paren: >
- let g:pyindent_open_paren = '&sw * 2'
+ let g:pyindent_open_paren = 'shiftwidth() * 2'
Indent after a nested paren: >
- let g:pyindent_nested_paren = '&sw'
+ let g:pyindent_nested_paren = 'shiftwidth()'
Indent for a continuation line: >
- let g:pyindent_continue = '&sw * 2'
+ let g:pyindent_continue = 'shiftwidth() * 2'
-The method uses searchpair() to look back for unclosed parenthesis. This can
-sometimes be slow, thus it timeouts after 150 msec. If you notice the
+The method uses |searchpair()| to look back for unclosed parenthesis. This
+can sometimes be slow, thus it timeouts after 150 msec. If you notice the
indenting isn't correct, you can set a larger timeout in msec: >
let g:pyindent_searchpair_timeout = 500
@@ -1035,7 +1036,7 @@ Furthermore, setting the variable b:verilog_indent_width to change the
indenting width (default is 'shiftwidth'): >
let b:verilog_indent_width = 4
- let b:verilog_indent_width = &sw * 2
+ let b:verilog_indent_width = shiftwidth() * 2
In addition, you can turn the verbose mode for debug issue: >
@@ -1158,7 +1159,7 @@ VIM *ft-vim-indent*
For indenting Vim scripts there is one variable that specifies the amount of
indent for a continuation line, a line that starts with a backslash: >
- :let g:vim_indent_cont = &sw * 3
+ :let g:vim_indent_cont = shiftwidth() * 3
Three times shiftwidth is the default value.
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 765f8ce3a1..03523042c6 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1429,8 +1429,9 @@ tag command action ~
|:recover| :rec[over] recover a file from a swap file
|:redo| :red[o] redo one undone change
|:redir| :redi[r] redirect messages to a file or register
-|:redraw| :redr[aw] force a redraw of the display
-|:redrawstatus| :redraws[tatus] force a redraw of the status line(s)
+|:redraw| :redr[aw] force a redraw of the display
+|:redrawstatus| :redraws[tatus] force a redraw of the status line(s)
+|:redrawtabline| :redrawt[abline] force a redraw of the tabline
|:registers| :reg[isters] display the contents of registers
|:resize| :res[ize] change current window height
|:retab| :ret[ab] change tab size
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 74c9a2a003..a2fdd821ff 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1190,7 +1190,7 @@ reported if any are supplied). However, it is possible to specify that the
command can take arguments, using the -nargs attribute. Valid cases are:
-nargs=0 No arguments are allowed (the default)
- -nargs=1 Exactly one argument is required, it includes spaces
+ -nargs=1 Exactly one argument is required, it includes spaces
-nargs=* Any number of arguments are allowed (0, 1, or many),
separated by white space
-nargs=? 0 or 1 arguments are allowed
@@ -1213,8 +1213,9 @@ defined, not where it is invoked! Example:
Executing script2.vim will result in "None" being echoed. Not what you
intended! Calling a function may be an alternative.
-Completion behavior *:command-completion* *E179*
- *E180* *E181* *:command-complete*
+Completion behavior ~
+ *:command-completion* *E179* *E180* *E181*
+ *:command-complete*
By default, the arguments of user defined commands do not undergo completion.
However, by specifying one or the other of the following attributes, argument
completion can be enabled:
@@ -1335,12 +1336,13 @@ which by default correspond to the current line, last line and the whole
buffer, relate to arguments, (loaded) buffers, windows or tab pages.
Possible values are:
- -addr=lines Range of lines (this is the default)
- -addr=arguments Range for arguments
- -addr=buffers Range for buffers (also not loaded buffers)
- -addr=loaded_buffers Range for loaded buffers
- -addr=windows Range for windows
- -addr=tabs Range for tab pages
+ -addr=lines Range of lines (this is the default)
+ -addr=arguments Range for arguments
+ -addr=buffers Range for buffers (also not loaded buffers)
+ -addr=loaded_buffers Range for loaded buffers
+ -addr=windows Range for windows
+ -addr=tabs Range for tab pages
+ -addr=other other kind of range
Special cases *:command-bang* *:command-bar*
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 205db12f3b..dccf39b3df 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -534,14 +534,6 @@ This message is only given when Vim detects a problem when searching for a
tag. Sometimes this message is not given, even though the tags file is not
properly sorted.
- *E460* >
- The resource fork would be lost (add ! to override)
-
-On the Macintosh (classic), when writing a file, Vim attempts to preserve all
-info about a file, including its resource fork. If this is not possible you
-get this error message. Append "!" to the command name to write anyway (and
-lose the info).
-
*E424* >
Too many different highlighting attributes in use
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index d5a123e3ea..461fefe903 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -107,7 +107,7 @@ This cannot be repeated: >
endif<CR>
Note that when using ":" any motion becomes characterwise exclusive.
-
+ *forced-motion*
FORCING A MOTION TO BE LINEWISE, CHARACTERWISE OR BLOCKWISE
When a motion is not of the type you would like to use, you can force another
@@ -993,7 +993,7 @@ remembered. You can return to that position with the "''" and "``" command,
unless the line containing that position was changed or deleted. The
following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N",
"%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the
-commands that start editing a new file.
+commands that start editing a new file.
*CTRL-O*
CTRL-O Go to [count] Older cursor position in jump list
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index f8a6ee4a48..d0ead3c256 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -295,12 +295,12 @@ files. You use this command: >
:setlocal makeprg=perlmake
You can switch back to using the global value by making the local value empty: >
:setlocal makeprg=
-This only works for a string option. For a boolean option you need to use the
-"<" flag, like this: >
+This only works for a string option. For a number or boolean option you need
+to use the "<" flag, like this: >
:setlocal autoread<
-Note that for non-boolean options using "<" copies the global value to the
-local value, it doesn't switch back to using the global value (that matters
-when the global value changes later). You can also use: >
+Note that for non-boolean and non-number options using "<" copies the global
+value to the local value, it doesn't switch back to using the global value
+(that matters when the global value changes later). You can also use: >
:set path<
This will make the local value of 'path' empty, so that the global value is
used. Thus it does the same as: >
@@ -1661,7 +1661,10 @@ A jump table for the options with a short description can be found at |Q_op|.
deleted only once. Also when repeating "R" with "."
and a count.
*cpo-y*
- y A yank command can be redone with ".".
+ y A yank command can be redone with ".". Think twice if
+ you really want to use this, it may break some
+ plugins, since most people expect "." to only repeat a
+ change.
*cpo-Z*
Z When using "w!" while the 'readonly' option is set,
don't reset 'readonly'.
@@ -1935,7 +1938,7 @@ A jump table for the options with a short description can be found at |Q_op|.
diff library.
algorithm:{text} Use the specified diff algorithm with the
- internal diff engine. Currently supported
+ internal diff engine. Currently supported
algorithms are:
myers the default algorithm
minimal spend extra time to generate the
@@ -5626,8 +5629,8 @@ A jump table for the options with a short description can be found at |Q_op|.
After this option has been set successfully, Vim will source the files
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
- up to the first character that is not an ASCII letter and not a dash.
- Also see |set-spc-auto|.
+ up to the first character that is not an ASCII letter or number and
+ not a dash. Also see |set-spc-auto|.
*'spellsuggest'* *'sps'*
@@ -6217,10 +6220,11 @@ A jump table for the options with a short description can be found at |Q_op|.
'thesaurus' 'tsr' string (default "")
global or local to buffer |global-local|
List of file names, separated by commas, that are used to lookup words
- for thesaurus completion commands |i_CTRL-X_CTRL-T|. Each line in
- the file should contain words with similar meaning, separated by
- non-keyword characters (white space is preferred). Maximum line
- length is 510 bytes.
+ for thesaurus completion commands |i_CTRL-X_CTRL-T|.
+
+ Each line in the file should contain words with similar meaning,
+ separated by non-keyword characters (white space is preferred).
+ Maximum line length is 510 bytes.
To include a comma in a file name precede it with a backslash. Spaces
after a comma are ignored, otherwise spaces are included in the file
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 022dc5607e..5d2c0e97b8 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -295,7 +295,7 @@ the "*" is under your right hand middle finger (search to the right and down).
*E956*
In very rare cases a regular expression is used recursively. This can happen
-when executing a pattern takes a long time and when checkig for messages on
+when executing a pattern takes a long time and when checking for messages on
channels a callback is invoked that also uses a pattern or an autocommand is
triggered. In most cases this should be fine, but if a pattern is in use when
it's used again it fails. Usually this means there is something wrong with
@@ -398,11 +398,11 @@ Use of "\m" makes the pattern after it be interpreted as if 'magic' is set,
ignoring the actual value of the 'magic' option.
Use of "\M" makes the pattern after it be interpreted as if 'nomagic' is used.
*/\v* */\V*
-Use of "\v" means that in the pattern after it all ASCII characters except
-'0'-'9', 'a'-'z', 'A'-'Z' and '_' have a special meaning. "very magic"
+Use of "\v" means that after it, all ASCII characters except '0'-'9', 'a'-'z',
+'A'-'Z' and '_' have special meaning: "very magic"
-Use of "\V" means that in the pattern after it only the backslash and the
-terminating character (/ or ?) has a special meaning. "very nomagic"
+Use of "\V" means that after it, only a backslash and terminating character
+(usually / or ?) have special meaning: "very nomagic"
Examples:
after: \v \m \M \V matches ~
diff --git a/runtime/doc/pi_matchit.txt b/runtime/doc/pi_matchit.txt
deleted file mode 100644
index 652734f7bb..0000000000
--- a/runtime/doc/pi_matchit.txt
+++ /dev/null
@@ -1,366 +0,0 @@
-*pi_matchit.txt* Extended "%" matching
-
-For Vim version 6.3. Last change: 2017 May 14
-
-*matchit* *matchit.vim*
-
-1. Extended matching with "%" |matchit-intro|
-2. Activation |matchit-activate|
-3. Configuration |matchit-configure|
-4. Supporting a New Language |matchit-newlang|
-5. Known Bugs and Limitations |matchit-bugs|
-
-The functionality mentioned here is a plugin, see |add-plugin|.
-You can avoid loading this plugin by setting the "loaded_matchit" variable
-in your |vimrc| file: >
- :let loaded_matchit = 1
-
-==============================================================================
-1. Extended matching with "%" *matchit-intro*
-
- *matchit-%*
-% Cycle forward through matching groups, such as "if", "else", "endif",
- as specified by |b:match_words|.
-
- *g%* *v_g%* *o_g%*
-g% Cycle backwards through matching groups, as specified by
- |b:match_words|. For example, go from "if" to "endif" to "else".
-
- *[%* *v_[%* *o_[%*
-[% Go to [count] previous unmatched group, as specified by
- |b:match_words|. Similar to |[{|.
-
- *]%* *v_]%* *o_]%*
-]% Go to [count] next unmatched group, as specified by
- |b:match_words|. Similar to |]}|.
-
- *a%* *v_a%*
-a% In Visual mode, select the matching group, as specified by
- |b:match_words|, containing the cursor. Similar to |v_a[|.
- A [count] is ignored, and only the first character of the closing
- pattern is selected.
-
-In Vim, as in plain vi, the percent key, |%|, jumps the cursor from a brace,
-bracket, or paren to its match. This can be configured with the 'matchpairs'
-option. The matchit plugin extends this in several ways:
-
- You can match whole words, such as "if" and "endif", not just
- single characters. You can also specify a |regular-expression|.
- You can define groups with more than two words, such as "if",
- "else", "endif". Banging on the "%" key will cycle from the "if" to
- the first "else", the next "else", ..., the closing "endif", and back
- to the opening "if". Nested structures are skipped. Using |g%| goes
- in the reverse direction.
- By default, words inside comments and strings are ignored, unless
- the cursor is inside a comment or string when you type "%". If the
- only thing you want to do is modify the behavior of "%" so that it
- behaves this way, you do not have to define |b:match_words|, since the
- script uses the 'matchpairs' option as well as this variable.
-
-See |matchit-details| for details on what the script does, and |b:match_words|
-for how to specify matching patterns.
-
-MODES: *matchit-modes* *matchit-v_%* *matchit-o_%*
-
-Mostly, % and related motions (|g%| and |[%| and |]%|) work just like built-in
-motion commands in |Operator-pending| and |Visual| modes. However, you
-cannot make these motions |linewise| or |characterwise|, since the |:omap|s
-that define them start with "v" in order to make the default behavior
-inclusive. (See |o_v|.) In other words, "dV%" will not work. The
-work-around is to go through Visual mode: "V%d" will work.
-
-LANGUAGES: *matchit-languages*
-
-Currently, the following languages are supported: Ada, ASP with VBS, Csh,
-DTD, Entity, Essbase, Fortran, HTML, JSP (same as HTML), LaTeX, Lua, Pascal,
-SGML, Shell, Tcsh, Vim, XML. Other languages may already have support via
-the default |filetype-plugin|s in the standard vim distribution.
-
-To support a new language, see |matchit-newlang| below.
-
-DETAILS: *matchit-details* *matchit-parse*
-
-Here is an outline of what matchit.vim does each time you hit the "%" key. If
-there are backrefs in |b:match_words| then the first step is to produce a
-version in which these back references have been eliminated; if there are no
-backrefs then this step is skipped. This step is called parsing. For
-example, "\(foo\|bar\):end\1" is parsed to yield
-"\(foo\|bar\):end\(foo\|bar\)". This can get tricky, especially if there are
-nested groups. If debugging is turned on, the parsed version is saved as
-|b:match_pat|.
-
- *matchit-choose*
-Next, the script looks for a word on the current line that matches the pattern
-just constructed. It includes the patterns from the 'matchpairs' option.
-The goal is to do what you expect, which turns out to be a little complicated.
-The script follows these rules:
-
- Insist on a match that ends on or after the cursor.
- Prefer a match that includes the cursor position (that is, one that
- starts on or before the cursor).
- Prefer a match that starts as close to the cursor as possible.
- If more than one pattern in |b:match_words| matches, choose the one
- that is listed first.
-
-Examples:
-
- Suppose you >
- :let b:match_words = '<:>,<tag>:</tag>'
-< and hit "%" with the cursor on or before the "<" in "a <tag> is born".
- The pattern '<' comes first, so it is preferred over '<tag>', which
- also matches. If the cursor is on the "t", however, then '<tag>' is
- preferred, because this matches a bit of text containing the cursor.
- If the two groups of patterns were reversed then '<' would never be
- preferred.
-
- Suppose you >
- :let b:match_words = 'if:end if'
-< (Note the space!) and hit "%" with the cursor at the end of "end if".
- Then "if" matches, which is probably not what you want, but if the
- cursor starts on the "end " then "end if" is chosen. (You can avoid
- this problem by using a more complicated pattern.)
-
-If there is no match, the cursor does not move. (Before version 1.13 of the
-script, it would fall back on the usual behavior of |%|). If debugging is
-turned on, the matched bit of text is saved as |b:match_match| and the cursor
-column of the start of the match is saved as |b:match_col|.
-
-Next, the script looks through |b:match_words| (original and parsed versions)
-for the group and pattern that match. If debugging is turned on, the group is
-saved as |b:match_ini| (the first pattern) and |b:match_tail| (the rest). If
-there are backrefs then, in addition, the matching pattern is saved as
-|b:match_word| and a table of translations is saved as |b:match_table|. If
-there are backrefs, these are determined from the matching pattern and
-|b:match_match| and substituted into each pattern in the matching group.
-
-The script decides whether to search forwards or backwards and chooses
-arguments for the |searchpair()| function. Then, the cursor is moved to the
-start of the match, and |searchpair()| is called. By default, matching
-structures inside strings and comments are ignored. This can be changed by
-setting |b:match_skip|.
-
-==============================================================================
-2. Activation *matchit-activate*
-
-For a new language, you can add a line such as >
- let b:match_words = '\<foo\>:\<bar\>'
-to the corresponding |filetype-plugin|. See |b:match_words| below for how
-this variable is interpreted.
-
-==============================================================================
-3. Configuration *matchit-configure*
-
-There are several variables that govern the behavior of matchit.vim. Note
-that these are variables local to the buffer, not options, so use |:let| to
-define them, not |:set|. Some of these variables have values that matter; for
-others, it only matters whether the variable has been defined. All of these
-can be defined in the |filetype-plugin| or autocommand that defines
-|b:match_words| or "on the fly."
-
-The main variable is |b:match_words|. It is described in the section below on
-supporting a new language.
-
- *MatchError* *matchit-hl* *matchit-highlight*
-MatchError is the highlight group for error messages from the script. By
-default, it is linked to WarningMsg. If you do not want to be bothered by
-error messages, you can define this to be something invisible. For example,
-if you use the GUI version of Vim and your command line is normally white, you
-can do >
- :hi MatchError guifg=white guibg=white
-<
- *b:match_ignorecase*
-If you >
- :let b:match_ignorecase = 1
-then matchit.vim acts as if 'ignorecase' is set: for example, "end" and "END"
-are equivalent. If you >
- :let b:match_ignorecase = 0
-then matchit.vim treats "end" and "END" differently. (There will be no
-b:match_infercase option unless someone requests it.)
-
- *b:match_debug*
-Define b:match_debug if you want debugging information to be saved. See
-|matchit-debug|, below.
-
- *b:match_skip*
-If b:match_skip is defined, it is passed as the skip argument to
-|searchpair()|. This controls when matching structures are skipped, or
-ignored. By default, they are ignored inside comments and strings, as
-determined by the |syntax| mechanism. (If syntax highlighting is turned off,
-nothing is skipped.) You can set b:match_skip to a string, which evaluates to
-a non-zero, numerical value if the match is to be skipped or zero if the match
-should not be skipped. In addition, the following special values are
-supported by matchit.vim:
- s:foo becomes (current syntax item) =~ foo
- S:foo becomes (current syntax item) !~ foo
- r:foo becomes (line before cursor) =~ foo
- R:foo becomes (line before cursor) !~ foo
-(The "s" is meant to suggest "syntax", and the "r" is meant to suggest
-"regular expression".)
-
-Examples:
-
- You can get the default behavior with >
- :let b:match_skip = 's:comment\|string'
-<
- If you want to skip matching structures unless they are at the start
- of the line (ignoring whitespace) then you can >
- :let b:match_skip = 'R:^\s*'
-< Do not do this if strings or comments can span several lines, since
- the normal syntax checking will not be done if you set b:match_skip.
-
- In LaTeX, since "%" is used as the comment character, you can >
- :let b:match_skip = 'r:%'
-< Unfortunately, this will skip anything after "\%", an escaped "%". To
- allow for this, and also "\\%" (an escaped backslash followed by the
- comment character) you can >
- :let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%'
-<
- See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both
- syntax and a regular expression.
-
-==============================================================================
-4. Supporting a New Language *matchit-newlang*
- *b:match_words*
-In order for matchit.vim to support a new language, you must define a suitable
-pattern for |b:match_words|. You may also want to set some of the
-|matchit-configure| variables, as described above. If your language has a
-complicated syntax, or many keywords, you will need to know something about
-Vim's |regular-expression|s.
-
-The format for |b:match_words| is similar to that of the 'matchpairs' option:
-it is a comma (,)-separated list of groups; each group is a colon(:)-separated
-list of patterns (regular expressions). Commas and backslashes that are part
-of a pattern should be escaped with backslashes ('\:' and '\,'). It is OK to
-have only one group; the effect is undefined if a group has only one pattern.
-A simple example is >
- :let b:match_words = '\<if\>:\<endif\>,'
- \ . '\<while\>:\<continue\>:\<break\>:\<endwhile\>'
-(In Vim regular expressions, |/\<| and |/\>| denote word boundaries. Thus "if"
-matches the end of "endif" but "\<if\>" does not.) Then banging on the "%"
-key will bounce the cursor between "if" and the matching "endif"; and from
-"while" to any matching "continue" or "break", then to the matching "endwhile"
-and back to the "while". It is almost always easier to use |literal-string|s
-(single quotes) as above: '\<if\>' rather than "\\<if\\>" and so on.
-
-Exception: If the ":" character does not appear in b:match_words, then it is
-treated as an expression to be evaluated. For example, >
- :let b:match_words = 'GetMatchWords()'
-allows you to define a function. This can return a different string depending
-on the current syntax, for example.
-
-Once you have defined the appropriate value of |b:match_words|, you will
-probably want to have this set automatically each time you edit the
-appropriate file type. The recommended way to do this is by adding the
-definition to a |filetype-plugin| file.
-
-Tips: Be careful that your initial pattern does not match your final pattern.
-See the example above for the use of word-boundary expressions. It is usually
-better to use ".\{-}" (as many as necessary) instead of ".*" (as many as
-possible). See |/\{-|. For example, in the string "<tag>label</tag>", "<.*>"
-matches the whole string whereas "<.\{-}>" and "<[^>]*>" match "<tag>" and
-"</tag>".
-
- *matchit-spaces* *matchit-s:notend*
-If "if" is to be paired with "end if" (Note the space!) then word boundaries
-are not enough. Instead, define a regular expression s:notend that will match
-anything but "end" and use it as follows: >
- :let s:notend = '\%(\<end\s\+\)\@<!'
- :let b:match_words = s:notend . '\<if\>:\<end\s\+if\>'
-< *matchit-s:sol*
-This is a simplified version of what is done for Ada. The s:notend is a
-|script-variable|. Similarly, you may want to define a start-of-line regular
-expression >
- :let s:sol = '\%(^\|;\)\s*'
-if keywords are only recognized after the start of a line or after a
-semicolon (;), with optional white space.
-
- *matchit-backref* *matchit-\1*
-In any group, the expressions `\1`, `\2`, ..., `\9` (see |/\1|) refer to parts of the
-INITIAL pattern enclosed in escaped parentheses. These are referred to as
-back references, or backrefs. For example, >
- :let b:match_words = '\<b\(o\+\)\>:\(h\)\1\>'
-means that "bo" pairs with "ho" and "boo" pairs with "hoo" and so on. Note
-that "\1" does not refer to the "\(h\)" in this example. If you have
-"\(nested \(parentheses\)\) then "\d" refers to the d-th "\(" and everything
-up to and including the matching "\)": in "\(nested\(parentheses\)\)", "\1"
-refers to everything and "\2" refers to "\(parentheses\)". If you use a
-variable such as `s:notend` or `s:sol` in the previous paragraph then remember
-to count any "\(" patterns in this variable. You do not have to count groups
-defined by |/\%(\)|.
-
-It should be possible to resolve back references from any pattern in the
-group. For example, >
- :let b:match_words = '\(foo\)\(bar\):more\1:and\2:end\1\2'
-would not work because "\2" cannot be determined from "morefoo" and "\1"
-cannot be determined from "andbar". On the other hand, >
- :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1'
-should work (and have the same effect as "foobar:barfoo:endfoobar"), although
-this has not been thoroughly tested.
-
-You can use |/zero-width| patterns such as |/\@<=| and |/\zs|. (The latter has
-not been thouroughly tested in matchit.vim.) For example, if the keyword "if"
-must occur at the start of the line, with optional white space, you might use
-the pattern "\(^\s*\)\@<=if" so that the cursor will end on the "i" instead of
-at the start of the line. For another example, if HTML had only one tag then
-one could >
- :let b:match_words = '<:>,<\@<=tag>:<\@<=/tag>'
-so that "%" can bounce between matching "<" and ">" pairs or (starting on
-"tag" or "/tag") between matching tags. Without the |/\@<=|, the script would
-bounce from "tag" to the "<" in "</tag>", and another "%" would not take you
-back to where you started.
-
-DEBUGGING *matchit-debug* *:MatchDebug*
-
-If you are having trouble figuring out the appropriate definition of
-|b:match_words| then you can take advantage of the same information I use when
-debugging the script. This is especially true if you are not sure whether
-your patterns or my script are at fault! To make this more convenient, I have
-made the command :MatchDebug, which defines the variable |b:match_debug| and
-creates a Matchit menu. This menu makes it convenient to check the values of
-the variables described below. You will probably also want to read
-|matchit-details| above.
-
-Defining the variable |b:match_debug| causes the script to set the following
-variables, each time you hit the "%" key. Several of these are only defined
-if |b:match_words| includes backrefs.
-
- *b:match_pat*
-The b:match_pat variable is set to |b:match_words| with backrefs parsed.
- *b:match_match*
-The b:match_match variable is set to the bit of text that is recognized as a
-match.
- *b:match_col*
-The b:match_col variable is set to the cursor column of the start of the
-matching text.
- *b:match_wholeBR*
-The b:match_wholeBR variable is set to the comma-separated group of patterns
-that matches, with backrefs unparsed.
- *b:match_iniBR*
-The b:match_iniBR variable is set to the first pattern in |b:match_wholeBR|.
- *b:match_ini*
-The b:match_ini variable is set to the first pattern in |b:match_wholeBR|,
-with backrefs resolved from |b:match_match|.
- *b:match_tail*
-The b:match_tail variable is set to the remaining patterns in
-|b:match_wholeBR|, with backrefs resolved from |b:match_match|.
- *b:match_word*
-The b:match_word variable is set to the pattern from |b:match_wholeBR| that
-matches |b:match_match|.
- *b:match_table*
-The back reference '\'.d refers to the same thing as '\'.b:match_table[d] in
-|b:match_word|.
-
-==============================================================================
-5. Known Bugs and Limitations *matchit-bugs*
-
-The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may
-have undesired effects in Select mode |Select-mode-mapping|. At least, if you
-want to replace the selection with any character in "ag%[]" there will be a
-pause of |'updatetime'| first. E.g., "yV%" would normally work linewise, but
-the plugin mapping makes it characterwise.
-
-It would be nice if "\0" were recognized as the entire pattern. That is, it
-would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1".
-
-==============================================================================
- vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index 7b9c418a46..ca836fea67 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -97,14 +97,14 @@ processing a quickfix or location list command, it will be aborted.
:[count]lne[xt][!] Same as ":cnext", except the location list for the
current window is used instead of the quickfix list.
-:[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext*
+:[count]cN[ext][!] *:cp* *:cprevious* *:cprev* *:cN* *:cNext*
:[count]cp[revious][!] Display the [count] previous error in the list that
includes a file name. If there are no file names at
all, go to the [count] previous error. See |:cc| for
[!] and 'switchbuf'.
-:[count]lN[ext][!] *:lp* *:lprevious* *:lN* *:lNext*
+:[count]lN[ext][!] *:lp* *:lprevious* *:lprev* *:lN* *:lNext*
:[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location
list for the current window is used instead of the
quickfix list.
@@ -355,6 +355,23 @@ modify the title of a quickfix and location list respectively. Examples: >
call setloclist(3, [], 'a', {'title' : 'Cmd output'})
echo getloclist(3, {'title' : 1})
<
+ *quickfix-index*
+When you jump to a quickfix/location list entry using any of the quickfix
+commands (e.g. |:cc|, |:cnext|, |:cprev|, etc.), that entry becomes the
+currently selected entry. The index of the currently selected entry in a
+quickfix/location list can be obtained using the getqflist()/getloclist()
+functions. Examples: >
+ echo getqflist({'idx' : 0}).idx
+ echo getqflist({'id' : qfid, 'idx' : 0}).idx
+ echo getloclist(2, {'idx' : 0}).idx
+<
+For a new quickfix list, the first entry is selected and the index is 1. Any
+entry in any quickfix/location list can be set as the currently selected entry
+using the setqflist() function. Examples: >
+ call setqflist([], 'a', {'idx' : 12})
+ call setqflist([], 'a', {'id' : qfid, 'idx' : 7})
+ call setloclist(1, [], 'a', {'idx' : 7})
+<
*quickfix-size*
You can get the number of entries (size) in a quickfix and a location list
using the |getqflist()| and |getloclist()| functions respectively. Examples: >
@@ -889,7 +906,7 @@ commands can be combined to create a NewGrep command: >
'smartcase' is not used.
If {pattern} is empty (e.g. // is specified), the last
used search pattern is used. |last-pattern|
-
+:{count}vim[grep] ...
When a number is put before the command this is used
as the maximum number of matches to find. Use
":1vimgrep pattern file" to find only the first.
@@ -1515,7 +1532,7 @@ The backslashes before the pipe character are required to avoid it to be
recognized as a command separator. The backslash before each space is
required for the set command.
- *cfilter-plugin* *Cfilter* *Lfilter*
+ *cfilter-plugin* *:Cfilter* *:Lfilter*
If you have too many matching messages, you can use the cfilter plugin to
reduce the number of entries. Load the plugin with: >
packadd cfilter
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index 0a552a1309..d4eb3f0f6e 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -306,7 +306,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|<SID>|.
:scr[iptnames][!] {scriptId} *:script*
- Edit script {scriptId}. Suggested name is ":script".
+ Edit script {scriptId}. Although ":scriptnames name"
+ works, using ":script name" is recommended.
+ When the current buffer can't be |abandon|ed and the !
+ is not present, the command fails.
*:fini* *:finish* *E168*
:fini[sh] Stop sourcing a script. Can only be used in a Vim
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index cf7e01bcea..4e0d91dae0 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -37,6 +37,7 @@ There are two steps in using signs:
displayed. A defined sign can be placed several times in different lines
and files.
+ *sign-column*
When signs are defined for a file, Vim will automatically add a column of two
characters to display them in. When the last sign is unplaced the column
disappears again. This behavior can be changed with the 'signcolumn' option.
@@ -49,7 +50,7 @@ Example to set the color: >
*sign-identifier*
Each placed sign is identified by a number called the sign identifier. This
identifier is used to jump to the sign or to remove the sign. The identifier
-is assigned when placing the sign using the |sign-place| command or the
+is assigned when placing the sign using the |:sign-place| command or the
|sign_place()| function. Each sign identifier should be a unique number. If
multiple placed signs use the same identifier, then jumping to or removing a
sign becomes unpredictable. To avoid overlapping identifiers, sign groups can
@@ -70,6 +71,10 @@ on the same line, the attributes of the sign with the highest priority is used
independent of the sign group. The default priority for a sign is 10. The
priority is assigned at the time of placing a sign.
+When the line on which the sign is placed is deleted, the sign is moved to the
+next line (or the last line of the buffer, if there is no next line). When
+the delete is undone the sign does not move back.
+
==============================================================================
2. Commands *sign-commands* *:sig* *:sign*
@@ -92,7 +97,7 @@ See |sign_define()| for the equivalent Vim script function.
:sign define {name} {argument}...
Define a new sign or set attributes for an existing sign.
The {name} can either be a number (all digits) or a name
- starting with a non-digit. Leading digits are ignored, thus
+ starting with a non-digit. Leading zeros are ignored, thus
"0012", "012" and "12" are considered the same name.
About 120 different signs can be defined.
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index 875f3f2c08..67917d9617 100644
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -558,7 +558,7 @@ When the Myspell files are updated you can merge the differences:
nvim -d xx_YY.orig.dic xx_YY.new.dic
3. Take over the changes you like in xx_YY.dic.
You may also need to change xx_YY.aff.
-4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
+4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.orig.aff.
SPELL FILE VERSIONS *E770* *E771* *E772*
@@ -1562,6 +1562,10 @@ CHECKCOMPOUNDTRIPLE (Hunspell) *spell-CHECKCOMPOUNDTRIPLE*
Forbid three identical characters when compounding. Not
supported.
+CHECKSHARPS (Hunspell)) *spell-CHECKSHARPS*
+ SS letter pair in uppercased (German) words may be upper case
+ sharp s (ß). Not supported.
+
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
Enables using two prefixes. Not supported.
@@ -1575,12 +1579,21 @@ COMPOUNDFIRST (Hunspell) *spell-COMPOUNDFIRST*
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
+ Words signed with COMPOUNDBEGIN may be first elements in
+ compound words.
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
-COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
+COMPOUNDLAST (Hunspell) *spell-COMPOUNDLAST*
+ Words signed with COMPOUNDLAST may be last elements in
+ compound words.
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
+COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
+ Probably the same as COMPOUNDLAST
+
COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
+ Words signed with COMPOUNDMIDDLE may be middle elements in
+ compound words.
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDRULES (Hunspell) *spell-COMPOUNDRULES*
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 1373aff891..208e8ea48d 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -346,20 +346,9 @@ Upon loading a file, Vim finds the relevant syntax file as follows:
syntax.
==============================================================================
-4. Syntax file remarks *:syn-file-remarks*
+4. Conversion to HTML *2html.vim* *convert-to-HTML*
- *b:current_syntax-variable*
-Vim stores the name of the syntax that has been loaded in the
-"b:current_syntax" variable. You can use this if you want to load other
-settings, depending on which syntax is active. Example: >
- :au BufReadPost * if b:current_syntax == "csh"
- :au BufReadPost * do-some-things
- :au BufReadPost * endif
-
-
-2HTML *2html.vim* *convert-to-HTML*
-
-This is not a syntax file itself, but a script that converts the current
+2html is not a syntax file itself, but a script that converts the current
window into HTML. Vim opens a new window in which it builds the HTML file.
After you save the resulting file, you can view it with any browser. The
@@ -649,12 +638,12 @@ the rendered page generated by 2html.vim.
:let g:html_no_pre = 1
<
*g:html_expand_tabs*
-Default: 1 if 'tabstop' is 8, 'expandtab' is 0, and no fold column or line
- numbers occur in the generated HTML;
- 0 otherwise.
-When 0, <Tab> characters in the buffer text are replaced with an appropriate
+Default: 0 if 'tabstop' is 8, 'expandtab' is 0, 'vartabstop' is not in use,
+ and no fold column or line numbers occur in the generated HTML;
+ 1 otherwise.
+When 1, <Tab> characters in the buffer text are replaced with an appropriate
number of space characters, or &nbsp; references if |g:html_no_pre| is 1.
-When 1, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
+When 0, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
are included as-is in the generated HTML. This is useful for when you want to
allow copy and paste from a browser without losing the actual whitespace in
the source document. Note that this can easily break text alignment and
@@ -751,6 +740,18 @@ When 1, generate XHTML 1.0 instead (XML compliant HTML).
>
:let g:html_use_xhtml = 1
<
+==============================================================================
+5. Syntax file remarks *:syn-file-remarks*
+
+ *b:current_syntax-variable*
+Vim stores the name of the syntax that has been loaded in the
+"b:current_syntax" variable. You can use this if you want to load other
+settings, depending on which syntax is active. Example: >
+ :au BufReadPost * if b:current_syntax == "csh"
+ :au BufReadPost * do-some-things
+ :au BufReadPost * endif
+
+
ABEL *abel.vim* *ft-abel-syntax*
@@ -917,6 +918,9 @@ to the respective variable. Example: >
To disable them use ":unlet". Example: >
:unlet c_comment_strings
+An alternative is to switch to the C++ highlighting: >
+ :set filetype=cpp
+
Variable Highlight ~
*c_gnu* GNU gcc specific items
*c_comment_strings* strings and numbers inside a comment
@@ -2666,9 +2670,29 @@ later, and part earlier) adds.
RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
-You may set what syntax definitions should be used for code blocks via >
+Syntax highlighting is enabled for code blocks within the document for a
+select number of file types. See $VIMRUNTIME/syntax/rst.vim for the default
+syntax list.
+
+To set a user-defined list of code block syntax highlighting: >
let rst_syntax_code_list = ['vim', 'lisp', ...]
-<
+
+To assign multiple code block types to a single syntax, define
+`rst_syntax_code_list` as a mapping: >
+ let rst_syntax_code_list = {
+ \ 'cpp' = ['cpp', 'c++'],
+ \ 'bash' = ['bash', 'sh'],
+ ...
+ }
+
+To use color highlighting for emphasis text: >
+ let rst_use_emphasis_colors = 1
+
+To enable folding of sections: >
+ let rst_fold_enabled = 1
+
+Note that folding can cause performance issues on some platforms.
+
REXX *rexx.vim* *ft-rexx-syntax*
@@ -3437,7 +3461,7 @@ The syntax script for zsh allows for syntax-based folding: >
:let g:zsh_fold_enable = 1
==============================================================================
-5. Defining a syntax *:syn-define* *E410*
+6. Defining a syntax *:syn-define* *E410*
Vim understands three types of syntax items:
@@ -3796,7 +3820,7 @@ DEFINING REGIONS *:syn-region* *:syn-start* *:syn-skip* *:syn-end*
The maximum number of syntax groups is 19999.
==============================================================================
-6. :syntax arguments *:syn-arguments*
+7. :syntax arguments *:syn-arguments*
The :syntax commands that define syntax items take a number of arguments.
The common ones are explained here. The arguments may be given in any order
@@ -4117,7 +4141,7 @@ IMPLICIT CONCEAL *:syn-conceal-implicit*
Show either "syntax conceal on" or "syntax conceal off" (translated).
==============================================================================
-7. Syntax patterns *:syn-pattern* *E401* *E402*
+8. Syntax patterns *:syn-pattern* *E401* *E402*
In the syntax commands, a pattern must be surrounded by two identical
characters. This is like it works for the ":s" command. The most common to
@@ -4295,7 +4319,7 @@ Note that only matches within a single line can be used. Multi-line matches
cannot be referred to.
==============================================================================
-8. Syntax clusters *:syn-cluster* *E400*
+9. Syntax clusters *:syn-cluster* *E400*
:sy[ntax] cluster {cluster-name} [contains={group-name}..]
[add={group-name}..]
@@ -4341,7 +4365,7 @@ This also has implications for nested clusters: >
The maximum number of clusters is 9767.
==============================================================================
-9. Including syntax files *:syn-include* *E397*
+10. Including syntax files *:syn-include* *E397*
It is often useful for one language's syntax file to include a syntax file for
a related language. Depending on the exact relationship, this can be done in
@@ -4382,7 +4406,7 @@ two different ways:
The maximum number of includes is 999.
==============================================================================
-10. Synchronizing *:syn-sync* *E403* *E404*
+11. Synchronizing *:syn-sync* *E403* *E404*
Vim wants to be able to start redrawing in any position in the document. To
make this possible it needs to know the syntax state at the position where
@@ -4574,7 +4598,7 @@ You can clear specific sync patterns with: >
:syntax sync clear {sync-group-name} ..
==============================================================================
-11. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list*
+12. Listing syntax items *:syntax* *:sy* *:syn* *:syn-list*
This command lists all the syntax items: >
@@ -5087,7 +5111,7 @@ Without the "default" in the C syntax file, the highlighting would be
overruled when the syntax file is loaded.
==============================================================================
-14. Cleaning up *:syn-clear* *E391*
+15. Cleaning up *:syn-clear* *E391*
If you want to clear the syntax stuff for the current buffer, you can use this
command: >
@@ -5177,7 +5201,7 @@ syntax/syncolor.vim files are loaded:
them.
==============================================================================
-15. Highlighting tags *tag-highlight*
+16. Highlighting tags *tag-highlight*
If you want to highlight all the tags in your file, you can use the following
mappings.
@@ -5212,7 +5236,7 @@ And put these lines in your vimrc: >
autocmd BufRead,BufNewFile *.[ch] endif
==============================================================================
-16. Window-local syntax *:ownsyntax*
+17. Window-local syntax *:ownsyntax*
Normally all windows on a buffer share the same syntax settings. It is
possible, however, to set a particular window on a file to have its own
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index a4526a7f2c..f63535af11 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -173,8 +173,8 @@ commands explained above the tag stack will look like this:
1 1 main 1 harddisk2:text/vim/test
2 1 FuncB 59 harddisk2:text/vim/src/main.c
-The gettagstack() function returns the tag stack of a specified window. The
-settagstack() function modifies the tag stack of a window.
+The |gettagstack()| function returns the tag stack of a specified window. The
+|settagstack()| function modifies the tag stack of a window.
*E73*
When you try to use the tag stack while it doesn't contain anything you will
diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt
index af17d75656..d85be4ccae 100644
--- a/runtime/doc/usr_05.txt
+++ b/runtime/doc/usr_05.txt
@@ -11,12 +11,13 @@ Vim's capabilities. Or define your own macros.
|05.1| The vimrc file
|05.2| The example vimrc file explained
-|05.3| Simple mappings
-|05.4| Adding a package
-|05.5| Adding a plugin
-|05.6| Adding a help file
-|05.7| The option window
-|05.8| Often used options
+|05.3| The defaults.vim file explained
+|05.4| Simple mappings
+|05.5| Adding a package
+|05.6| Adding a plugin
+|05.7| Adding a help file
+|05.8| The option window
+|05.9| Often used options
Next chapter: |usr_06.txt| Using syntax highlighting
Previous chapter: |usr_04.txt| Making small changes
@@ -172,21 +173,12 @@ This switches on three very clever mechanisms:
automatically. Vim comes with these indent rules for a number of
filetypes. See |:filetype-indent-on| and 'indentexpr'.
->
- autocmd FileType text setlocal textwidth=78
-
-This makes Vim break text to avoid lines getting longer than 78 characters.
-But only for files that have been detected to be plain text. There are
-actually two parts here. "autocmd FileType text" is an autocommand. This
-defines that when the file type is set to "text" the following command is
-automatically executed. "setlocal textwidth=78" sets the 'textwidth' option
-to 78, but only locally in one file.
- *restore-cursor* >
- autocmd BufReadPost *
- \ if line("'\"") > 1 && line("'\"") <= line("$") |
- \ exe "normal! g`\"" |
- \ endif
+ *restore-cursor* *last-position-jump* >
+ autocmd BufReadPost *
+ \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
+ \ | exe "normal! g`\""
+ \ | endif
Another autocommand. This time it is used after reading any file. The
complicated stuff after it checks if the '" mark is defined, and jumps to it
@@ -195,8 +187,22 @@ from the previous line. That avoids a line getting very long.
See |line-continuation|. This only works in a Vim script file, not when
typing commands at the command-line.
+>
+ command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
+ \ | wincmd p | diffthis
+
+This adds the ":DiffOrig" command. Use this in a modified buffer to see the
+differences with the file it was loaded from. See |diff|.
+
+>
+ set nolangremap
+
+Prevent that the langmap option applies to characters that result from a
+mapping. If set (default), this may break plugins (but it's backward
+compatible). See 'langremap'.
+
==============================================================================
-*05.3* Simple mappings
+*05.4* Simple mappings
A mapping enables you to bind a set of Vim commands to a single key. Suppose,
for example, that you need to surround certain words with curly braces. In
@@ -243,7 +249,7 @@ The ":map" command (with no arguments) lists your current mappings. At
least the ones for Normal mode. More about mappings in section |40.1|.
==============================================================================
-*05.4* Adding a package *add-package* *vimball-install*
+*05.5* Adding a package *add-package* *vimball-install*
A package is a set of files that you can add to Vim. There are two kinds of
packages: optional and automatically loaded on startup.
@@ -283,7 +289,7 @@ an archive or as a repository. For an archive you can follow these steps:
More information about packages can be found here: |packages|.
==============================================================================
-*05.5* Adding a plugin *add-plugin* *plugin*
+*05.6* Adding a plugin *add-plugin* *plugin*
Vim's functionality can be extended by adding plugins. A plugin is nothing
more than a Vim script file that is loaded automatically when Vim starts. You
@@ -420,7 +426,7 @@ Further reading:
|new-filetype| How to detect a new file type.
==============================================================================
-*05.6* Adding a help file *add-local-help*
+*05.7* Adding a help file *add-local-help*
If you are lucky, the plugin you installed also comes with a help file. We
will explain how to install the help file, so that you can easily find help
@@ -453,7 +459,7 @@ them through the tag.
For writing a local help file, see |write-local-help|.
==============================================================================
-*05.7* The option window
+*05.8* The option window
If you are looking for an option that does what you want, you can search in
the help files here: |options|. Another way is by using this command: >
@@ -492,7 +498,7 @@ border. This is what the 'scrolloff' option does, it specifies an offset
from the window border where scrolling starts.
==============================================================================
-*05.8* Often used options
+*05.9* Often used options
There are an awful lot of options. Most of them you will hardly ever use.
Some of the more useful ones will be mentioned here. Don't forget you can
diff --git a/runtime/doc/usr_11.txt b/runtime/doc/usr_11.txt
index 42b564e962..c26f1e8f09 100644
--- a/runtime/doc/usr_11.txt
+++ b/runtime/doc/usr_11.txt
@@ -120,7 +120,7 @@ the resulting files if they are what you expected.
USING A SPECIFIC SWAP FILE
If you know which swap file needs to be used, you can recover by giving the
-swap file name. Vim will then finds out the name of the original file from
+swap file name. Vim will then find out the name of the original file from
the swap file.
Example: >
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index def781c109..2c38c6fef2 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -612,6 +612,7 @@ String manipulation: *string-functions*
repeat() repeat a string multiple times
eval() evaluate a string expression
execute() execute an Ex command and get the output
+ trim() trim characters from a string
List manipulation: *list-functions*
get() get an item without error for wrong index
@@ -769,7 +770,7 @@ System functions and manipulation of files:
systemlist() get the result of a shell command as a list
hostname() name of the system
readfile() read a file into a List of lines
- writefile() write a List of lines into a file
+ writefile() write a List of lines or Blob into a file
Date and Time: *date-functions* *time-functions*
getftime() get last modification time of a file
@@ -798,6 +799,9 @@ Buffers, windows and the argument list:
bufwinnr() get the window number of a specific buffer
winbufnr() get the buffer number of a specific window
getbufline() get a list of lines from the specified buffer
+ setbufline() replace a line in the specified buffer
+ appendbufline() append a list of lines in the specified buffer
+ deletebufline() delete lines from a specified buffer
win_findbuf() find windows containing a buffer
win_getid() get window ID of a window
win_gotoid() go to window with ID
@@ -808,6 +812,8 @@ Buffers, windows and the argument list:
getwininfo() get a list with window information
getchangelist() get a list of change list entries
getjumplist() get a list of jump list entries
+ swapinfo() information about a swap file
+ swapname() get the swap file path of a buffer
Command line: *command-line-functions*
getcmdline() get the current command line
@@ -906,6 +912,7 @@ Window size and position: *window-size-functions*
winheight() get height of a specific window
winwidth() get width of a specific window
win_screenpos() get screen position of a window
+ winlayout() get layout of windows in a tab page
winrestcmd() return command to restore window sizes
winsaveview() get view of current window
winrestview() restore saved view of current window
@@ -928,6 +935,7 @@ Signs: *sign-functions*
Testing: *test-functions*
assert_equal() assert that two expressions values are equal
+ assert_equalfile() assert that two file contents are equal
assert_notequal() assert that two expressions values are not equal
assert_inrange() assert that an expression is inside a range
assert_match() assert that a pattern matches the value
@@ -940,7 +948,21 @@ Testing: *test-functions*
Timers: *timer-functions*
timer_start() create a timer
+ timer_pause() pause or unpause a timer
timer_stop() stop a timer
+ timer_stopall() stop all timers
+ timer_info() get information about timers
+
+Tags: *tag-functions*
+ taglist() get list of matching tags
+ tagfiles() get a list of tags files
+ gettagstack() get the tag stack of a window
+ settagstack() modify the tag stack of a window
+
+Prompt Buffer: *promptbuffer-functions*
+ prompt_setcallback() set prompt callback for a buffer
+ prompt_setinterrupt() set interrupt callback for a buffer
+ prompt_setprompt() set the prompt text for a buffer
Various: *various-functions*
mode() get current editing mode
@@ -969,15 +991,11 @@ Various: *various-functions*
wordcount() get byte/word/char count of buffer
- taglist() get list of matching tags
- tagfiles() get a list of tags files
- gettagstack() get the tag stack
- settagstack() modify the tag stack
-
luaeval() evaluate Lua expression
py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|)
pyxeval() evaluate |python_x| expression
+ debugbreak() interrupt a program being debugged
==============================================================================
*41.7* Defining a function
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index a5ef55b8f2..bc742b9221 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -64,6 +64,10 @@ the differences.
- 'wildmenu' is enabled
- 'wildoptions' defaults to "pum,tagfile"
+- The |man.vim| plugin is enabled, to provide the |:Man| command.
+- The |matchit| plugin is enabled. To disable it in your config: >
+ :let loaded_matchit = 1
+
==============================================================================
3. New Features *nvim-features*
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 243060a617..ac9e1f48fe 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -64,6 +64,10 @@ will not change within a Vim session. The |win_getid()| and |win_id2tabwin()|
functions can be used to convert between the window/tab number and the
identifier. There is also the window number, which may change whenever
windows are opened or closed, see |winnr()|.
+The window number is only valid in one specific tab. The window ID is valid
+across tabs. For most functions that take a window ID or a window number, the
+window number only applies to the current tab, while the window ID can refer
+to a window in any tab.
Each buffer has a unique number and the number will not change within a Vim
session. The |bufnr()| and |bufname()| functions can be used to convert