aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-19 17:48:20 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-03-30 08:35:13 +0800
commitb2819eec26c6e18fe41b103efad641fc2f227450 (patch)
tree1879db2afaa055be54702f108961a59a13c95a61
parent1bbe8ec2820497b8a61adcd138da350445b0ad92 (diff)
downloadrneovim-b2819eec26c6e18fe41b103efad641fc2f227450.tar.gz
rneovim-b2819eec26c6e18fe41b103efad641fc2f227450.tar.bz2
rneovim-b2819eec26c6e18fe41b103efad641fc2f227450.zip
docs(pattern.txt): cherry-pick latests changes from Vim runtime updates
Update runtime files https://github.com/vim/vim/commit/53f7fccc9413c9f770694b56f40f242d383b2d5f Update runtime files https://github.com/vim/vim/commit/2286304cdbba53ceb52b3ba2ba4a521b0a2f8d0f Update runtime files https://github.com/vim/vim/commit/2f0936cb9a2eb026acac03e6a8fd0b2a5d97508b Update runtime files. https://github.com/vim/vim/commit/a2baa73d1d33014adea0fd9567949089ca21a782
-rw-r--r--runtime/doc/pattern.txt41
1 files changed, 20 insertions, 21 deletions
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index c12a099469..35f5b311ff 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -914,18 +914,18 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
becomes invalid. Vim doesn't automatically update the matches.
Similar to moving the cursor for "\%#" |/\%#|.
- */\%l* */\%>l* */\%<l* *E951*
+ */\%l* */\%>l* */\%<l* *E951* *E1204*
\%23l Matches in a specific line.
\%<23l Matches above a specific line (lower line number).
\%>23l Matches below a specific line (higher line number).
-\%.l Matches at the cursor line.
-\%<.l Matches above the cursor line.
-\%>.l Matches below the cursor line.
- These three can be used to match specific lines in a buffer. The "23"
+\%.l Matches at the cursor line.
+\%<.l Matches above the cursor line.
+\%>.l Matches below the cursor line.
+ These six can be used to match specific lines in a buffer. The "23"
can be any line number. The first line is 1.
WARNING: When inserting or deleting lines Vim does not automatically
update the matches. This means Syntax highlighting quickly becomes
- wrong. Also when refering to the cursor position (".") and
+ wrong. Also when referring to the cursor position (".") and
the cursor moves the display isn't updated for this change. An update
is done when using the |CTRL-L| command (the whole screen is updated).
Example, to highlight the line where the cursor currently is: >
@@ -939,19 +939,18 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
\%23c Matches in a specific column.
\%<23c Matches before a specific column.
\%>23c Matches after a specific column.
-\%.c Matches at the cursor column.
-\%<.c Matches before the cursor column.
-\%>.c Matches after the cursor column.
- These three can be used to match specific columns in a buffer or
- string. The "23" can be any column number. The first column is 1.
- Actually, the column is the byte number (thus it's not exactly right
- for multibyte characters).
+\%.c Matches at the cursor column.
+\%<.c Matches before the cursor column.
+\%>.c Matches after the cursor column.
+ These six can be used to match specific columns in a buffer or string.
+ The "23" can be any column number. The first column is 1. Actually,
+ the column is the byte number (thus it's not exactly right for
+ multibyte characters).
WARNING: When inserting or deleting text Vim does not automatically
update the matches. This means Syntax highlighting quickly becomes
- wrong. Also when refering to the cursor position (".") and
+ wrong. Also when referring to the cursor position (".") and
the cursor moves the display isn't updated for this change. An update
is done when using the |CTRL-L| command (the whole screen is updated).
-
Example, to highlight the column where the cursor currently is: >
:exe '/\%' .. col(".") .. 'c'
< Alternatively use: >
@@ -966,11 +965,11 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
\%23v Matches in a specific virtual column.
\%<23v Matches before a specific virtual column.
\%>23v Matches after a specific virtual column.
-\%.v Matches at the current virtual column.
-\%<.v Matches before the current virtual column.
-\%>.v Matches after the current virtual column.
- These three can be used to match specific virtual columns in a buffer
- or string. When not matching with a buffer in a window, the option
+\%.v Matches at the current virtual column.
+\%<.v Matches before the current virtual column.
+\%>.v Matches after the current virtual column.
+ These six can be used to match specific virtual columns in a buffer or
+ string. When not matching with a buffer in a window, the option
values of the current window are used (e.g., 'tabstop').
The "23" can be any column number. The first column is 1.
Note that some virtual column positions will never match, because they
@@ -978,7 +977,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
one screen character.
WARNING: When inserting or deleting text Vim does not automatically
update highlighted matches. This means Syntax highlighting quickly
- becomes wrong. Also when refering to the cursor position (".") and
+ becomes wrong. Also when referring to the cursor position (".") and
the cursor moves the display isn't updated for this change. An update
is done when using the |CTRL-L| command (the whole screen is updated).
Example, to highlight all the characters after virtual column 72: >