Mercurial > vim
comparison runtime/macros/matchit.txt @ 799:6beb2c667935
updated for version 7.0b
author | vimboss |
---|---|
date | Fri, 24 Mar 2006 22:21:52 +0000 |
parents | 3fc0f57ecb91 |
children | 82b5078be2dd |
comparison
equal
deleted
inserted
replaced
798:95dac6af3b3a | 799:6beb2c667935 |
---|---|
2 | 2 |
3 For instructions on installing this file, type | 3 For instructions on installing this file, type |
4 :help matchit-install | 4 :help matchit-install |
5 inside Vim. | 5 inside Vim. |
6 | 6 |
7 For Vim version 6.3. Last change: 2004 May 12 | 7 For Vim version 6.3. Last change: 2006 Feb 23 |
8 | 8 |
9 | 9 |
10 VIM REFERENCE MANUAL by Benji Fisher | 10 VIM REFERENCE MANUAL by Benji Fisher |
11 | 11 |
12 *matchit* *matchit.vim* | 12 *matchit* *matchit.vim* |
245 < Unfortunately, this will skip anything after "\%", an escaped "%". To | 245 < Unfortunately, this will skip anything after "\%", an escaped "%". To |
246 allow for this, and also "\\%" (an excaped backslash followed by the | 246 allow for this, and also "\\%" (an excaped backslash followed by the |
247 comment character) you can > | 247 comment character) you can > |
248 :let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%' | 248 :let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%' |
249 < | 249 < |
250 See the $VIMRUNTIME/syntax/vim.vim for an example that uses both | 250 See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both |
251 syntax and a regular expression. | 251 syntax and a regular expression. |
252 | 252 |
253 ============================================================================== | 253 ============================================================================== |
254 4. Supporting a New Language *matchit-newlang* | 254 4. Supporting a New Language *matchit-newlang* |
255 *b:match_words* | 255 *b:match_words* |
259 complicated syntax, or many keywords, you will need to know something about | 259 complicated syntax, or many keywords, you will need to know something about |
260 Vim's |regular-expression|s. | 260 Vim's |regular-expression|s. |
261 | 261 |
262 The format for |b:match_words| is similar to that of the 'matchpairs' option: | 262 The format for |b:match_words| is similar to that of the 'matchpairs' option: |
263 it is a comma (,)-separated list of groups; each group is a colon(:)-separated | 263 it is a comma (,)-separated list of groups; each group is a colon(:)-separated |
264 list of patterns (regular expressions). It is OK to have only one group; the | 264 list of patterns (regular expressions). Commas and backslashes that are part |
265 effect is undefined if a group has only one pattern. A simple example is > | 265 of a pattern should be escaped with backslashes ('\:' and '\,'). It is OK to |
266 have only one group; the effect is undefined if a group has only one pattern. | |
267 A simple example is > | |
266 :let b:match_words = '\<if\>:\<endif\>,' | 268 :let b:match_words = '\<if\>:\<endif\>,' |
267 \ . '\<while\>:\<continue\>:\<break\>:\<endwhile\>' | 269 \ . '\<while\>:\<continue\>:\<break\>:\<endwhile\>' |
268 (In Vim regular expressions, |\<| and |\>| denote word boundaries. Thus "if" | 270 (In Vim regular expressions, |\<| and |\>| denote word boundaries. Thus "if" |
269 matches the end of "endif" but "\<if\>" does not.) Then banging on the "%" | 271 matches the end of "endif" but "\<if\>" does not.) Then banging on the "%" |
270 key will bounce the cursor between "if" and the matching "endif"; and from | 272 key will bounce the cursor between "if" and the matching "endif"; and from |