summaryrefslogtreecommitdiffstats
path: root/runtime/doc/pattern.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-06-12 23:01:46 +0200
committerBram Moolenaar <Bram@vim.org>2016-06-12 23:01:46 +0200
commitc95a302a4c42ec8230473cd4a5e0064d0a143aa8 (patch)
treeec8985d4cea1e9ace755daa0018a3cf62c62994d /runtime/doc/pattern.txt
parent2d35899721da0e9359a9fe1059554f8c4ea7f0c1 (diff)
Updated runtime files.
Diffstat (limited to 'runtime/doc/pattern.txt')
-rw-r--r--runtime/doc/pattern.txt18
1 files changed, 11 insertions, 7 deletions
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 38d172c434..d47fd9255b 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 7.4. Last change: 2016 Apr 26
+*pattern.txt* For Vim version 7.4. Last change: 2016 Jun 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -954,14 +954,18 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
< When 'hlsearch' is set and you move the cursor around and make changes
this will clearly show when the match is updated or not.
To match the text up to column 17: >
- /.*\%17v
-< Column 17 is included, because that's where the "\%17v" matches,
- even though this is a |/zero-width| match. Adding a dot to match the
- next character has the same result: >
- /.*\%17v.
+ /^.*\%17v
+< Column 17 is not included, because this is a |/zero-width| match. To
+ include the column use: >
+ /^.*\%17v.
< This command does the same thing, but also matches when there is no
character in column 17: >
- /.*\%<18v.
+ /^.*\%<18v.
+< Note that without the "^" to anchor the match in the first column,
+ this will also highlight column 17: >
+ /.*\%17v
+< Column 17 is highlighted by 'hlsearch' because there is another match
+ where ".*" matches zero characters.
<
Character classes: {not in Vi}