From c95a302a4c42ec8230473cd4a5e0064d0a143aa8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Jun 2016 23:01:46 +0200 Subject: Updated runtime files. --- runtime/doc/pattern.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'runtime/doc/pattern.txt') 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} -- cgit v1.2.3