aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: >