Mercurial > vim
comparison runtime/doc/spell.txt @ 371:4b9fef49d7ff v7.0095
updated for version 7.0095
author | vimboss |
---|---|
date | Mon, 27 Jun 2005 22:48:21 +0000 |
parents | 6c62b9b939bd |
children | 575dacb554d8 |
comparison
equal
deleted
inserted
replaced
370:3a21825ad207 | 371:4b9fef49d7ff |
---|---|
1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 25 | 1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 27 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
264 ============================================================================== | 264 ============================================================================== |
265 2. Generating a spell file *spell-mkspell* | 265 2. Generating a spell file *spell-mkspell* |
266 | 266 |
267 Vim uses a binary file format for spelling. This greatly speeds up loading | 267 Vim uses a binary file format for spelling. This greatly speeds up loading |
268 the word list and keeps it small. | 268 the word list and keeps it small. |
269 | 269 *.aff* *.dic* *Myspell* |
270 You can create a Vim spell file from the .aff and .dic files that Myspell | 270 You can create a Vim spell file from the .aff and .dic files that Myspell |
271 uses. Myspell is used by OpenOffice.org and Mozilla. You should be able to | 271 uses. Myspell is used by OpenOffice.org and Mozilla. You should be able to |
272 find them here: | 272 find them here: |
273 http://lingucomponent.openoffice.org/spell_dic.html | 273 http://lingucomponent.openoffice.org/spell_dic.html |
274 You can also use a plain word list. The results are the same, the choice | 274 You can also use a plain word list. The results are the same, the choice |
319 Mbyte). The final result will be much smaller. | 319 Mbyte). The final result will be much smaller. |
320 | 320 |
321 When the spell file was written all currently used | 321 When the spell file was written all currently used |
322 spell files will be reloaded. | 322 spell files will be reloaded. |
323 | 323 |
324 :mksp[ell] [-ascii] {add-name} | 324 :mksp[ell] [-ascii] {name}.{enc}.add |
325 Like ":mkspell" above, using {add-name} as the input | 325 Like ":mkspell" above, using {name}.{enc}.add as the |
326 file and producing an output file that has ".spl" | 326 input file and producing an output file that has |
327 ".spl" appended. | |
328 | |
329 :mksp[ell] [-ascii] {name} | |
330 Like ":mkspell" above, using {name} as the input file | |
331 and producing an output file that has ".{enc}.spl" | |
327 appended. | 332 appended. |
328 | 333 |
329 Since you might want to change a Myspell word list for use with Vim the | 334 Since you might want to change a Myspell word list for use with Vim the |
330 following procedure is recommended: | 335 following procedure is recommended: |
331 | 336 |
555 The XX.ascii.spl spell file generated with the "-ascii" argument will not | 560 The XX.ascii.spl spell file generated with the "-ascii" argument will not |
556 contain the table with characters, so that it can be combine with spell files | 561 contain the table with characters, so that it can be combine with spell files |
557 for any encoding. The .add.spl files also do not contain the table. | 562 for any encoding. The .add.spl files also do not contain the table. |
558 | 563 |
559 | 564 |
565 MID-WORD CHARACTERS | |
566 *spell-midword* | |
567 Some characters are only to be considered word characters if they are used in | |
568 between two ordinary word characters. An example is the single quote: It is | |
569 often used to put text in quotes, thus it can't be recognized as a word | |
570 character, but when it appears in between word characters it must be part of | |
571 the word. This is needed to detect a spelling error such as they'are. That | |
572 should be they're, but since "they" and "are" are words themselves that would | |
573 go unnoticed. | |
574 | |
575 These characters are defined with MIDWORD in the .aff file: | |
576 | |
577 MIDWORD '- ~ | |
578 | |
579 | |
560 AFFIXES | 580 AFFIXES |
561 *spell-affix-PFX* *spell-affix-SFX* | 581 *spell-affix-PFX* *spell-affix-SFX* |
562 The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell | 582 The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell |
563 documentation). Note that Myspell ignores any extra text after the relevant | 583 documentation or the Aspell manual: |
564 info. Vim requires this text to start with a "#" so that mistakes don't go | 584 http://aspell.net/man-html/Affix-Compression.html). |
565 unnoticed. Example: | 585 |
566 | 586 Note that Myspell ignores any extra text after the relevant info. Vim |
567 SFX F 0 in [^i]n # Spion > Spionin ~ | 587 requires this text to start with a "#" so that mistakes don't go unnoticed. |
588 Example: | |
589 | |
590 SFX F 0 in [^i]n # Spion > Spionin ~ | |
591 SFX F 0 nen in # Bauerin > Bauerinnen ~ | |
592 | |
593 An extra item for Vim is the "rare" flag. It must come after the other | |
594 fields, before a comment. When used then all words that use the affix will be | |
595 marked as rare words. Example: | |
596 | |
597 PFX F 0 nene . rare ~ | |
598 SFX F 0 oin n rare # hardly ever used ~ | |
599 | |
600 However, if the word also appears as a good word in another way it won't be | |
601 marked as rare. | |
568 | 602 |
569 *spell-affix-PFXPOSTPONE* | 603 *spell-affix-PFXPOSTPONE* |
570 When an affix file has very many prefixes that apply to many words it's not | 604 When an affix file has very many prefixes that apply to many words it's not |
571 possible to build the whole word list in memory. This applies to Hebrew (a | 605 possible to build the whole word list in memory. This applies to Hebrew (a |
572 list with all words is over a Gbyte). In that case applying prefixes must be | 606 list with all words is over a Gbyte). In that case applying prefixes must be |
608 bad words. Example: | 642 bad words. Example: |
609 | 643 |
610 BAD ! ~ | 644 BAD ! ~ |
611 | 645 |
612 This can be used to exclude words that would otherwise be good. For example | 646 This can be used to exclude words that would otherwise be good. For example |
613 "the the". Once a word has been marked as bad it won't be undone by | 647 "the the" in the .dic file: |
614 encountering the same word as good. | 648 |
649 the the/! ~ | |
650 | |
651 Once a word has been marked as bad it won't be undone by encountering the same | |
652 word as good. | |
615 | 653 |
616 | 654 |
617 REPLACEMENTS *spell-affix-REP* | 655 REPLACEMENTS *spell-affix-REP* |
618 | 656 |
619 In the affix file REP items can be used to define common mistakes. This is | 657 In the affix file REP items can be used to define common mistakes. This is |