diff options
author | Christian Brabandt <cb@256bit.org> | 2023-10-21 11:06:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-21 11:06:50 +0200 |
commit | d3e277f279ed628809eb6857ea3ebcfca566ca2a (patch) | |
tree | b478c1a9efc785bd1e2ebcabdab0d9a173f0d1be /runtime/doc/pattern.txt | |
parent | 47416d1a7441f8c815438903e78ba0a2d877699e (diff) |
matchparen: do not use hard-coded match id (#13393)
* matchparen: do not use hard-coded match id
Instead of using the hard-coded match id 3, which may also be used by
other plugins, let the matchparen plugin use whatever ids are
automatically returned when calling matchaddpos().
For backwards-compatibility, keep the `:3match` call, which will still
use the hard-coded id 3 (as mentioned in :h :3match).
closes: #13381
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/doc/pattern.txt')
-rw-r--r-- | runtime/doc/pattern.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 4fa26e0431..983d995356 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 9.0. Last change: 2023 Feb 04 +*pattern.txt* For Vim version 9.0. Last change: 2023 Oct 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1461,10 +1461,11 @@ Finally, these constructs are unique to Perl: Just like |:match| above, but set a separate match. Thus there can be three matches active at the same time. The match with the lowest number has priority if several match at the - same position. - The ":3match" command is used by the |matchparen| plugin. You - are suggested to use ":match" for manual matching and - ":2match" for another plugin. + same position. It uses the match id 3. + The ":3match" command is used by (older Vims) |matchparen| + plugin. You are suggested to use ":match" for manual matching + and ":2match" for another plugin or even better make use of + the more flexible |matchadd()| (and similar) functions instead. ============================================================================== 11. Fuzzy matching *fuzzy-matching* |