comparison runtime/doc/spell.txt @ 227:ef254e0f2365

updated for version 7.0063
author vimboss
date Tue, 22 Mar 2005 23:03:44 +0000
parents 7fd4b5df33be
children 73354c21f1e4
comparison
equal deleted inserted replaced
226:4e7dca477fee 227:ef254e0f2365
1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Mar 20 1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Mar 22
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
27 SpellBad word not recognized 27 SpellBad word not recognized
28 SpellRare rare word 28 SpellRare rare word
29 SpellLocal wrong spelling for selected region 29 SpellLocal wrong spelling for selected region
30 30
31 31
32 PERFORMANCE
33
34 Note that Vim does on-the-fly spellchecking. To make this work fast the
35 word list is loaded in memory. Thus this uses a lot of memory (2 Mbyte or
36 more). There might also be a noticable delay when the word list is loaded,
37 which happens when 'spelllang' is set. Each word list is only loaded once,
38 they are not deleted when 'spelllang' is made empty. When 'encoding' is set
39 the word lists are reloaded, thus you may notice a delay then too.
40
41
32 REGIONS 42 REGIONS
33 43
34 A word may be spelled differently in various regions. For example, English 44 A word may be spelled differently in various regions. For example, English
35 comes in (at least) these variants: 45 comes in (at least) these variants:
36 46
53 yyy the value of 'encoding' 63 yyy the value of 'encoding'
54 64
55 Exception: Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign 65 Exception: Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign
56 doesn't matter for spelling. 66 doesn't matter for spelling.
57 67
68 Spelling for EBCDIC is currently not supported.
69
58 A spell file might not be available in the current 'encoding'. You may try 70 A spell file might not be available in the current 'encoding'. You may try
59 using the "iconv" program to create one: > 71 using the "iconv" program to create one: >
60 72
61 iconv -f latin1 -t koi8-r de.latin1.spl >de.koi8-r.spl 73 iconv -f latin1 -t koi8-r de.latin1.spl >de.koi8-r.spl
62 74
66 If a spell file only uses ASCII characters the encoding can be omitted. This 78 If a spell file only uses ASCII characters the encoding can be omitted. This
67 is useful for English: "en.spl" The file with encoding is checked first, thus 79 is useful for English: "en.spl" The file with encoding is checked first, thus
68 you could have one with encoding that includes words with non-ASCII characters 80 you could have one with encoding that includes words with non-ASCII characters
69 and use the ASCII file as a fall-back. 81 and use the ASCII file as a fall-back.
70 82
83
84 WORDS
85
86 Vim uses a fixed method to recognize a word. This is independent of
87 'iskeyword', so that it also works in help files and for languages that
88 include characters like '-' in 'iskeyword'. The word characters do depend on
89 'encoding'.
90
91 A word that starts with a digit is always ignored.
92
93
94 SYNTAX HIGHLIGHTING
95
96 Files that use syntax highlighting can specify where spell checking should be
97 done:
98
99 everywhere default
100 in specific items use "contains=@Spell"
101 everywhere but specific items use "contains=@NoSpell"
102
103 Note that mixing @Spell and @NoSpell doesn't make sense.
104
71 ============================================================================== 105 ==============================================================================
72 X. Spell file format *spell-file-format* 106 X. Spell file format *spell-file-format*
73 *E751* 107 *E751*
74 108
75 The spelling for a language is specified in file with a specific format. 109 The spelling for a language is specified in file with a specific format.
76 The first character of a line specifies what follows in the line: 110 The first character of a line specifies what follows in the line:
77 111
78 char argument meaning ~ 112 line meaning ~
79 - xx words for xx region follow (repeats) 113 -xx[-yy]... words for region xx (and region yy, etc.) follow
80 <space> <word> normal word 114 <word> normal word
81 > <word> rare word 115 ><word> rare word
82 = <word> word with non-keyword characters 116 +<word> optional addition after a word
83 + <word> optional word addition 117 !<word> normal word, keep upper/lower case
84 # <anything> comment 118 !><word> rare word, keep upper/lower case
119 !+<word> optional word addition, keep upper/lower case
120 #<anything> comment
85 121
86 Empty lines are ignored. The word continues until the end of the line. Watch 122 Empty lines are ignored. The word continues until the end of the line. Watch
87 out for trailing white space! 123 out for trailing white space!
88 124
89 Words that start with an upper-case letter will be required to be written that 125 Words that start with an upper-case letter will be required to start with an
90 way. Otherwise, words must be in lower-case. 126 upper-case letter. Otherwise, words must be in lower-case and case is
127 ignored.
91 128
92 It is possible that a word appears both with an upper-case letter and as a 129 It is possible that a word appears both with an upper-case letter and as a
93 rare word. This means that the word with an upper-case letter is OK and the 130 rare word. This means that the word with an upper-case letter is OK and the
94 word without the upper-case letter is rare. 131 word without the upper-case letter is rare.
95 *E753* 132 *E753*
96 The region is specified with "-xx". For example, in the "en.spl" file "-us" 133 The region is specified with "-xx". For example, in the "en.spl" file "-us"
97 starts the word for "en_us". This can be repeated for words that are used in 134 starts the word for "en_us". This can be repeated for words that are used in
98 more than one region. For example "-ca-us" is used for Canadian and US 135 more than one region. For example "-ca-us" is used for Canadian and US
99 English words. Use "---" to go back to the words for all regions. 136 English words. Use "---" to go back to the words for all regions.
100 137
101 Vim supports up to six regions. *E752* 138 Vim supports up to eight regions. *E752*
102 139
103 It is possible to have a match that starts with a valid word. In that case 140 It is possible to have a match that starts with a valid word. In that case
104 the match is used, because it is longer. Example: 141 the match is used, because it is longer. Example:
105 142
106 we 143 we