Mercurial > vim
comparison runtime/doc/syntax.txt @ 419:f713fc55bf7b v7.0109
updated for version 7.0109
author | vimboss |
---|---|
date | Mon, 18 Jul 2005 21:58:11 +0000 |
parents | 289b19a6f2ed |
children | dd9db57ee7ce |
comparison
equal
deleted
inserted
replaced
418:84825cc6f049 | 419:f713fc55bf7b |
---|---|
1 *syntax.txt* For Vim version 7.0aa. Last change: 2005 Jul 05 | 1 *syntax.txt* For Vim version 7.0aa. Last change: 2005 Jul 18 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
2514 ============================================================================== | 2514 ============================================================================== |
2515 5. Defining a syntax *:syn-define* *E410* | 2515 5. Defining a syntax *:syn-define* *E410* |
2516 | 2516 |
2517 Vim understands three types of syntax items: | 2517 Vim understands three types of syntax items: |
2518 | 2518 |
2519 1. Keyword. | 2519 1. Keyword |
2520 It can only contain keyword characters, according to the 'iskeyword' | 2520 It can only contain keyword characters, according to the 'iskeyword' |
2521 option. It cannot contain other syntax items. It will only match with a | 2521 option. It cannot contain other syntax items. It will only match with a |
2522 complete word (there are no keyword characters before or after the match). | 2522 complete word (there are no keyword characters before or after the match). |
2523 The keyword "if" would match in "if(a=b)", but not in "ifdef x", because | 2523 The keyword "if" would match in "if(a=b)", but not in "ifdef x", because |
2524 "(" is not a keyword character and "d" is. | 2524 "(" is not a keyword character and "d" is. |
2525 | 2525 |
2526 2. Match. | 2526 2. Match |
2527 This is a match with a single regexp pattern. | 2527 This is a match with a single regexp pattern. |
2528 | 2528 |
2529 3. Region. | 2529 3. Region |
2530 This starts at a match of the "start" regexp pattern and ends with a match | 2530 This starts at a match of the "start" regexp pattern and ends with a match |
2531 with the "end" regexp pattern. Any other text can appear in between. A | 2531 with the "end" regexp pattern. Any other text can appear in between. A |
2532 "skip" regexp pattern can be used to avoid matching the "end" pattern. | 2532 "skip" regexp pattern can be used to avoid matching the "end" pattern. |
2533 | 2533 |
2534 Several syntax ITEMs can be put into one syntax GROUP. For a syntax group | 2534 Several syntax ITEMs can be put into one syntax GROUP. For a syntax group |
2563 start in later positions. | 2563 start in later positions. |
2564 | 2564 |
2565 | 2565 |
2566 DEFINING CASE *:syn-case* *E390* | 2566 DEFINING CASE *:syn-case* *E390* |
2567 | 2567 |
2568 :sy[ntax] case [match|ignore] | 2568 :sy[ntax] case [match | ignore] |
2569 This defines if the following ":syntax" commands will work with | 2569 This defines if the following ":syntax" commands will work with |
2570 matching case, when using "match", or with ignoring case, when using | 2570 matching case, when using "match", or with ignoring case, when using |
2571 "ignore". Note that any items before this are not affected, and all | 2571 "ignore". Note that any items before this are not affected, and all |
2572 items until the next ":syntax case" command are affected. | 2572 items until the next ":syntax case" command are affected. |
2573 | |
2574 | |
2575 SPELL CHECKING *:syn-spell* | |
2576 | |
2577 :sy[ntax] spell [toplevel | notoplevel | default] | |
2578 This defines where spell checking is to be done for text that is not | |
2579 in a syntax item: | |
2580 | |
2581 toplevel: Text is spell checked. | |
2582 notoplevel: Text is not spell checked. | |
2583 default: When there is a @Spell cluster no spell checking. | |
2584 | |
2585 For text in syntax items use the @Spell and @NoSpell clusters | |
2586 |spell-syntax|. When there is no @Spell and no @NoSpell cluster then | |
2587 spell checking is done for "default" and "toplevel". | |
2588 | |
2589 To activate spell checking the 'spell' option must be set. | |
2573 | 2590 |
2574 | 2591 |
2575 DEFINING KEYWORDS *:syn-keyword* | 2592 DEFINING KEYWORDS *:syn-keyword* |
2576 | 2593 |
2577 :sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}] | 2594 :sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}] |