blob: 29fcbd68caf125b69a1c3760c7af460e3cccfeb0 [file] [log] [blame]
Bram Moolenaar3991dab2006-03-27 17:01:56 +00001*pi_paren.txt* For Vim version 7.0c. Last change: 2006 Mar 24
Bram Moolenaar5e3cb7e2006-02-27 23:58:35 +00002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7Highlighting matching parens *matchparen*
8
9The functionality mentioned here is a |standard-plugin|.
10This plugin is only available if 'compatible' is not set.
11
12You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
13 :let loaded_matchparen = 1
14
15The plugin installs CursorMoved autocommands to redefine the match
16highlighting.
17
18To disable the plugin after it was loaded use this command: >
19
20 :NoMatchParen
21
22And to enable it again: >
23
24 :DoMatchParen
25
Bram Moolenaarfd2ac762006-03-01 22:09:21 +000026The highlighting used is MatchParen. You can specify different colors with
Bram Moolenaar5e3cb7e2006-02-27 23:58:35 +000027the ":highlight" command. Example: >
28
Bram Moolenaarfd2ac762006-03-01 22:09:21 +000029 :hi MatchParen ctermbg=blue guibg=lightblue
Bram Moolenaar5e3cb7e2006-02-27 23:58:35 +000030
31The characters to be matched come from the 'matchpairs' option. You can
32change the value to highlight different matches. Note that not everything is
33possible. For example, you can't highlight single or double quotes, because
34the start and end are equal.
35
36The syntax highlighting attributes are used. When the cursor currently is not
37in a string or comment syntax item, then matches inside string and comment
38syntax items are ignored. Any syntax items with "string" or "comment"
39somewhere in their name are considered string or comment items.
40
41==============================================================================
42 vim:tw=78:ts=8:ft=help:norl: