Mercurial > vim
diff runtime/doc/pattern.txt @ 1326:22886f3d882d v7.1.040
updated for version 7.1-040
author | vimboss |
---|---|
date | Thu, 26 Jul 2007 20:58:42 +0000 |
parents | d9d524594fe5 |
children | 73fe8baea242 |
line wrap: on
line diff
--- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1212,7 +1212,10 @@ 10. Highlighting matches *match-highl {group} must exist at the moment this command is executed. The {group} highlighting still applies when a character is - to be highlighted for 'hlsearch'. + to be highlighted for 'hlsearch', as the highlighting for + matches is given higher priority than that of 'hlsearch'. + Syntax highlighting (see 'syntax') is also overruled by + matches. Note that highlighting the last used search pattern with 'hlsearch' is used in all windows, while the pattern defined @@ -1226,8 +1229,15 @@ 10. Highlighting matches *match-highl display you may get unexpected results. That is because Vim looks for a match in the line where redrawing starts. - Also see |matcharg()|, it returns the highlight group and - pattern of a previous :match command. + Also see |matcharg()|and |getmatches()|. The former returns + the highlight group and pattern of a previous |:match| + command. The latter returns a list with highlight groups and + patterns defined by both |matchadd()| and |:match|. + + Highlighting matches using |:match| are limited to three + matches (aside from |:match|, |:2match| and |:3match|are + available). |matchadd()| does not have this limitation and in + addition makes it possible to prioritize matches. Another example, which highlights all characters in virtual column 72 and more: >