blob: c83c8703db5378824f0a9eef40e145f1cf34eb04 [file] [log] [blame]
Bram Moolenaare0d7b3c2007-05-12 14:23:41 +00001*pi_paren.txt* For Vim version 7.1. Last change: 2006 Jun 14
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
Bram Moolenaar910f66f2006-04-05 20:41:53 +000041The search is limited to avoid a delay when moving the cursor. The limits
42are:
43- What is visible in the window.
44- 100 lines above or below the cursor to avoid a long delay when there are
45 closed folds.
Bram Moolenaar9964e462007-05-05 17:54:07 +000046- 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay
Bram Moolenaar910f66f2006-04-05 20:41:53 +000047 in a long line with syntax highlighting.
Bram Moolenaare2f98b92006-03-29 21:18:24 +000048
Bram Moolenaar5e3cb7e2006-02-27 23:58:35 +000049==============================================================================
50 vim:tw=78:ts=8:ft=help:norl: