341
|
1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 19
|
221
|
2
|
|
3
|
|
4 VIM REFERENCE MANUAL by Bram Moolenaar
|
|
5
|
|
6
|
|
7 Spell checking *spell*
|
|
8
|
|
9 1. Quick start |spell-quickstart|
|
237
|
10 2. Generating a spell file |spell-mkspell|
|
314
|
11 3. Spell file format |spell-file-format|
|
221
|
12
|
|
13 {Vi does not have any of these commands}
|
|
14
|
|
15 Spell checking is not available when the |+syntax| feature has been disabled
|
|
16 at compile time.
|
|
17
|
|
18 ==============================================================================
|
|
19 1. Quick start *spell-quickstart*
|
|
20
|
|
21 This command switches on spell checking: >
|
|
22
|
|
23 :setlocal spell spelllang=en_us
|
|
24
|
237
|
25 This switches on the 'spell' option and specifies to check for US English.
|
221
|
26
|
|
27 The words that are not recognized are highlighted with one of these:
|
333
|
28 SpellBad word not recognized |hl-SpellBad|
|
|
29 SpellRare rare word |hl-SpellRare|
|
|
30 SpellLocal wrong spelling for selected region |hl-SpellLocal|
|
221
|
31
|
237
|
32 Vim only checks words for spelling, there is no grammar check.
|
|
33
|
|
34 To search for the next misspelled word:
|
|
35
|
|
36 *]s* *E756*
|
|
37 ]s Move to next misspelled word after the cursor.
|
253
|
38 A count before the command can be used to repeat.
|
|
39 This uses the @Spell and @NoSpell clusters from syntax
|
|
40 highlighting, see |spell-syntax|.
|
237
|
41
|
|
42 *[s*
|
253
|
43 [s Like "]s" but search backwards, find the misspelled
|
|
44 word before the cursor.
|
|
45
|
|
46 *]S*
|
|
47 ]S Like "]s" but only stop at bad words, not at rare
|
|
48 words or words for another region.
|
|
49
|
|
50 *[S*
|
|
51 [S Like "]S" but search backwards.
|
237
|
52
|
221
|
53
|
323
|
54 To add words to your own word list: *E764*
|
314
|
55
|
|
56 *zg*
|
|
57 zg Add word under the cursor as a good word to
|
|
58 'spellfile'. In Visual mode the selected characters
|
|
59 are added as a word (including white space!).
|
|
60
|
|
61 *zw*
|
|
62 zw Add word under the cursor as a wrong (bad) word to
|
|
63 'spellfile'. In Visual mode the selected characters
|
|
64 are added as a word (including white space!).
|
|
65
|
333
|
66 *:spe* *:spellgood*
|
|
67 :spe[llgood] {word} Add [word} as a good word to 'spellfile'.
|
314
|
68
|
333
|
69 *:spellw* *:spellwrong*
|
314
|
70 :spellw[rong] {word} Add [word} as a wrong (bad) word to 'spellfile'.
|
|
71
|
|
72 After adding a word to 'spellfile' its associated ".spl" file will
|
320
|
73 automatically be updated. More details about the 'spellfile' format below
|
|
74 |spell-wordlist-format|.
|
314
|
75
|
|
76
|
323
|
77 Finding suggestions for bad words:
|
|
78
|
|
79 *z?*
|
|
80 z? For the badly spelled word under the cursor suggest
|
|
81 the correctly spelled word.
|
|
82 When there is no badly spelled word under the cursor
|
|
83 use the one after the cursor, in the same line.
|
|
84 The results are sorted on similarity to the badly
|
|
85 spelled word.
|
|
86 This may take a long time. Hit CTRL-C when you are
|
|
87 bored.
|
|
88 You can enter the number of your choice or press
|
|
89 <Enter> if you don't want to replace.
|
327
|
90 If 'verbose' is non-zero a score will be displayed to
|
|
91 indicate the likeliness to the badly spelled word (the
|
|
92 higher the score the more different).
|
|
93 The score may be slightly wrong for words with
|
|
94 multi-byte characters.
|
323
|
95
|
|
96
|
227
|
97 PERFORMANCE
|
|
98
|
320
|
99 Note that Vim does on-the-fly spell checking. To make this work fast the
|
237
|
100 word list is loaded in memory. Thus this uses a lot of memory (1 Mbyte or
|
320
|
101 more). There might also be a noticeable delay when the word list is loaded,
|
|
102 which happens when 'spelllang' or 'spell' is set. Each word list is only
|
|
103 loaded once, they are not deleted when 'spelllang' is made empty or 'spell' is
|
|
104 reset. When 'encoding' is set the word lists are reloaded, thus you may
|
|
105 notice a delay then too.
|
227
|
106
|
|
107
|
221
|
108 REGIONS
|
|
109
|
|
110 A word may be spelled differently in various regions. For example, English
|
|
111 comes in (at least) these variants:
|
|
112
|
|
113 en all regions
|
247
|
114 en_au Australia
|
|
115 en_ca Canada
|
221
|
116 en_gb Great Britain
|
247
|
117 en_nz New Zealand
|
|
118 en_us USA
|
221
|
119
|
|
120 Words that are not used in one region but are used in another region are
|
333
|
121 highlighted with SpellLocal |hl-SpellLocal|.
|
221
|
122
|
237
|
123 Always use lowercase letters for the language and region names.
|
221
|
124
|
320
|
125 When adding a word with |zg| or another command it's always added for all
|
|
126 regions. You can change that by manually editing the 'spellfile'. See
|
|
127 |spell-wordlist-format|.
|
|
128
|
221
|
129
|
|
130 SPELL FILES
|
|
131
|
|
132 Vim searches for spell files in the "spell" subdirectory of the directories in
|
320
|
133 'runtimepath'. The name is: LL.EEE.spl, where:
|
237
|
134 LL the language name
|
|
135 EEE the value of 'encoding'
|
221
|
136
|
320
|
137 Only the first file is loaded, the one that is first in 'runtimepath'. If
|
|
138 this succeeds then additionally files with the name LL.EEE.add.spl are loaded.
|
|
139 All the ones that are found are used.
|
|
140
|
242
|
141 Exceptions:
|
|
142 - Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign doesn't
|
|
143 matter for spelling.
|
|
144 - When no spell file for 'encoding' is found "ascii" is tried. This only
|
|
145 works for languages where nearly all words are ASCII, such as English. It
|
|
146 helps when 'encoding' is not "latin1", such as iso-8859-2, and English text
|
320
|
147 is being edited. For the ".add" files the same name as the found main
|
|
148 spell file is used.
|
|
149
|
|
150 For example, with these values:
|
|
151 'runtimepath' is "~/.vim,/usr/share/vim70,~/.vim/after"
|
|
152 'encoding' is "iso-8859-2"
|
|
153 'spelllang' is "pl"
|
|
154
|
|
155 Vim will look for:
|
|
156 1. ~/.vim/spell/pl.iso-8859-2.spl
|
|
157 2. /usr/share/vim70/spell/pl.iso-8859-2.spl
|
|
158 3. ~/.vim/spell/pl.iso-8859-2.add.spl
|
|
159 4. /usr/share/vim70/spell/pl.iso-8859-2.add.spl
|
|
160 5. ~/.vim/after/spell/pl.iso-8859-2.add.spl
|
|
161
|
|
162 This assumes 1. is not found and 2. is found.
|
|
163
|
|
164 If 'encoding' is "latin1" Vim will look for:
|
|
165 1. ~/.vim/spell/pl.latin1.spl
|
|
166 2. /usr/share/vim70/spell/pl.latin1.spl
|
|
167 3. ~/.vim/after/spell/pl.latin1.spl
|
|
168 4. ~/.vim/spell/pl.ascii.spl
|
|
169 5. /usr/share/vim70/spell/pl.ascii.spl
|
|
170 6. ~/.vim/after/spell/pl.ascii.spl
|
|
171
|
|
172 This assumes none of them are found (Polish doesn't make sense when leaving
|
|
173 out the non-ASCII characters).
|
221
|
174
|
227
|
175 Spelling for EBCDIC is currently not supported.
|
|
176
|
237
|
177 A spell file might not be available in the current 'encoding'. See
|
|
178 |spell-mkspell| about how to create a spell file. Converting a spell file
|
242
|
179 with "iconv" will NOT work!
|
221
|
180
|
237
|
181 *E758* *E759*
|
|
182 When loading a spell file Vim checks that it is properly formatted. If you
|
242
|
183 get an error the file may be truncated, modified or intended for another Vim
|
|
184 version.
|
237
|
185
|
227
|
186
|
|
187 WORDS
|
|
188
|
|
189 Vim uses a fixed method to recognize a word. This is independent of
|
|
190 'iskeyword', so that it also works in help files and for languages that
|
|
191 include characters like '-' in 'iskeyword'. The word characters do depend on
|
|
192 'encoding'.
|
|
193
|
323
|
194 The table with word characters is stored in the main .spl file. Therefore it
|
|
195 matters what the current locale is when generating it! A .add.spl file does
|
|
196 not contain a word table.
|
|
197
|
320
|
198 A word that starts with a digit is always ignored. That includes hex numbers
|
|
199 in the form 0xff and 0XFF.
|
227
|
200
|
|
201
|
253
|
202 SYNTAX HIGHLIGHTING *spell-syntax*
|
227
|
203
|
|
204 Files that use syntax highlighting can specify where spell checking should be
|
|
205 done:
|
|
206
|
320
|
207 1. everywhere default
|
|
208 2. in specific items use "contains=@Spell"
|
|
209 3. everywhere but specific items use "contains=@NoSpell"
|
227
|
210
|
320
|
211 For the second method adding the @NoSpell cluster will disable spell checking
|
|
212 again. This can be used, for example, to add @Spell to the comments of a
|
|
213 program, and add @NoSpell for items that shouldn't be checked.
|
227
|
214
|
221
|
215 ==============================================================================
|
237
|
216 2. Generating a spell file *spell-mkspell*
|
|
217
|
|
218 Vim uses a binary file format for spelling. This greatly speeds up loading
|
|
219 the word list and keeps it small.
|
|
220
|
|
221 You can create a Vim spell file from the .aff and .dic files that Myspell
|
|
222 uses. Myspell is used by OpenOffice.org and Mozilla. You should be able to
|
|
223 find them here:
|
|
224 http://lingucomponent.openoffice.org/spell_dic.html
|
314
|
225 You can also use a plain word list.
|
221
|
226
|
341
|
227 Make sure your current locale is set properly, otherwise Vim doesn't know what
|
|
228 characters are upper/lower case letters. If the locale isn't available (e.g.,
|
|
229 when using an MS-Windows codepage on Unix) add tables to the .aff file
|
|
230 |spell-affix-chars|.
|
|
231
|
333
|
232 :mksp[ell][!] [-ascii] {outname} {inname} ... *:mksp* *:mkspell*
|
314
|
233 Generate a Vim spell file word lists. Example: >
|
|
234 :mkspell nl nl_NL.words
|
|
235 <
|
|
236 When {outname} ends in ".spl" it is used as the output
|
|
237 file name. Otherwise it should be a language name,
|
|
238 such as "en". The file written will be
|
|
239 {outname}.{encoding}.spl. {encoding} is the value of
|
|
240 the 'encoding' option.
|
301
|
241
|
333
|
242 When the output file already exists [!] must be added
|
|
243 to overwrite it.
|
|
244
|
242
|
245 When the [-ascii] argument is present, words with
|
|
246 non-ascii characters are skipped. The resulting file
|
314
|
247 ends in "ascii.spl".
|
301
|
248
|
|
249 The input can be the Myspell format files {inname}.aff
|
|
250 and {inname}.dic. If {inname}.aff does not exist then
|
|
251 {inname} is used as the file name of a plain word
|
|
252 list.
|
|
253
|
237
|
254 Multiple {inname} arguments can be given to combine
|
|
255 regions into one Vim spell file. Example: >
|
|
256 :mkspell ~/.vim/spell/en /tmp/en_US /tmp/en_CA /tmp/en_AU
|
|
257 < This combines the English word lists for US, CA and AU
|
|
258 into one en.spl file.
|
|
259 Up to eight regions can be combined. *E754* *755*
|
323
|
260 The REP and SAL items of the first .aff file where
|
|
261 they appear are used. |spell-affix-REP|
|
|
262 |spell-affix-SAL|
|
237
|
263
|
308
|
264 When the spell file was written all currently used
|
|
265 spell files will be reloaded.
|
|
266
|
314
|
267 :mksp[ell] [-ascii] {add-name}
|
|
268 Like ":mkspell" above, using {add-name} as the input
|
|
269 file and producing an output file that has ".spl"
|
|
270 appended.
|
|
271
|
|
272 Since you might want to change a Myspell word list for use with Vim the
|
|
273 following procedure is recommended:
|
237
|
274
|
|
275 1. Obtain the xx_YY.aff and xx_YY.dic files from Myspell.
|
|
276 2. Make a copy of these files to xx_YY.orig.aff and xx_YY.orig.dic.
|
|
277 3. Change the xx_YY.aff and xx_YY.dic files to remove bad words, add missing
|
258
|
278 words, define word characters with FOL/LOW/UPP, etc. The distributed
|
|
279 "src/spell/*.diff" files can be used.
|
|
280 4. Set 'encoding' to the desired encoding and use |:mkspell| to generate the
|
|
281 Vim spell file.
|
|
282 5. Try out the spell file with ":set spell spelllang=xx_YY".
|
221
|
283
|
237
|
284 When the Myspell files are updated you can merge the differences:
|
258
|
285 1. Obtain the new Myspell files as xx_YY.new.aff and xx_UU.new.dic.
|
|
286 2. Use Vimdiff to see what changed: >
|
237
|
287 vimdiff xx_YY.orig.dic xx_YY.new.dic
|
258
|
288 3. Take over the changes you like in xx_YY.dic.
|
237
|
289 You may also need to change xx_YY.aff.
|
258
|
290 4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
|
237
|
291
|
|
292 ==============================================================================
|
|
293 9. Spell file format *spell-file-format*
|
|
294
|
|
295 This is the format of the files that are used by the person who creates and
|
|
296 maintains a word list.
|
221
|
297
|
237
|
298 Note that we avoid the word "dictionary" here. That is because the goal of
|
|
299 spell checking differs from writing a dictionary (as in the book). For
|
|
300 spelling we need a list of words that are OK, thus need not to be highlighted.
|
|
301 Names will not appear in a dictionary, but do appear in a word list. And
|
|
302 some old words are rarely used and are common misspellings. These do appear
|
|
303 in a dictionary but not in a word list.
|
|
304
|
301
|
305 There are two formats: one with affix compression and one without. The files
|
|
306 with affix compression are used by Myspell (Mozilla and OpenOffice.org). This
|
|
307 requires two files, one with .aff and one with .dic extension. The second
|
|
308 format is a list of words.
|
|
309
|
|
310
|
320
|
311 FORMAT OF WORD LIST *spell-wordlist-format*
|
301
|
312
|
314
|
313 The words must appear one per line. That is all that is required.
|
|
314 Additionally the following items are recognized:
|
301
|
315 - Empty and blank lines are ignored.
|
|
316 - Lines starting with a # are ignored (comment lines).
|
308
|
317 - A line starting with "/encoding=", before any word, specifies the encoding
|
|
318 of the file. After the second '=' comes an encoding name. This tells Vim
|
|
319 to setup conversion from the specified encoding to 'encoding'.
|
320
|
320 - A line starting with "/regions=" specifies the region names that are
|
|
321 supported. Each region name must be two ASCII letters. The first one is
|
|
322 region 1. Thus "/regions=usca" has region 1 "us" and region 2 "ca".
|
|
323 In an addition word list the list should be equal to the main word list!
|
308
|
324 - A line starting with "/?" specifies a word that should be marked as rare.
|
|
325 - A line starting with "/!" specifies a word that should be marked as bad.
|
|
326 - A line starting with "/=" specifies a word where case must match exactly.
|
|
327 A "?" or "!" may be following: "/=?" and "/=!".
|
320
|
328 - Digits after "/" indicate the regions in which the word is valid. If no
|
|
329 regions are specified the word is valid in all regions.
|
314
|
330 - Other lines starting with '/' are reserved for future use. The ones that
|
|
331 are not recognized are ignored (but you do get a warning message).
|
301
|
332
|
320
|
333 Example:
|
|
334
|
|
335 # This is an example word list comment
|
|
336 /encoding=latin1 encoding of the file
|
|
337 /regions=uscagb regions "us", "ca" and "gb"
|
|
338 example word for all regions
|
|
339 /1blah word for region 1 "us"
|
|
340 /!Vim bad word
|
|
341 /?3Campbell rare word in region 3 "gb"
|
|
342 /='s mornings keep-case word
|
|
343
|
301
|
344
|
|
345 FORMAT WITH AFFIX COMPRESSION
|
|
346
|
237
|
347 There are two files: the basic word list and an affix file. The affixes are
|
|
348 used to modify the basic words to get the full word list. This significantly
|
|
349 reduces the number of words, especially for a language like Polish. This is
|
|
350 called affix compression.
|
221
|
351
|
237
|
352 The format for the affix and word list files is mostly identical to what
|
|
353 Myspell uses (the spell checker of Mozilla and OpenOffice.org). A description
|
|
354 can be found here:
|
|
355 http://lingucomponent.openoffice.org/affix.readme ~
|
|
356 Note that affixes are case sensitive, this isn't obvious from the description.
|
314
|
357
|
237
|
358 Vim supports a few extras. Hopefully Myspell will support these too some day.
|
|
359 See |spell-affix-vim|.
|
|
360
|
|
361 The basic word list and the affix file are combined and turned into a binary
|
|
362 spell file. All the preprocessing has been done, thus this file loads fast.
|
|
363 The binary spell file format is described in the source code (src/spell.c).
|
|
364 But only developers need to know about it.
|
221
|
365
|
237
|
366 The preprocessing also allows us to take the Myspell language files and modify
|
|
367 them before the Vim word list is made. The tools for this can be found in the
|
|
368 "src/spell" directory.
|
|
369
|
|
370
|
320
|
371 WORD LIST FORMAT *spell-dic-format*
|
237
|
372
|
|
373 A very short example, with line numbers:
|
221
|
374
|
237
|
375 1 1234
|
|
376 2 aan
|
|
377 3 Als
|
|
378 4 Etten-Leur
|
|
379 5 et al.
|
|
380 6 's-Gravenhage
|
|
381 7 's-Gravenhaags
|
|
382 8 bedel/P
|
|
383 9 kado/1
|
|
384 10 cadeau/2
|
|
385
|
314
|
386 The first line contains the number of words. Vim ignores it, but you do get
|
|
387 an error message if it's not there. *E760*
|
221
|
388
|
314
|
389 What follows is one word per line. There should be no white space before or
|
|
390 after the word.
|
237
|
391
|
|
392 When the word only has lower-case letters it will also match with the word
|
|
393 starting with an upper-case letter.
|
|
394
|
|
395 When the word includes an upper-case letter, this means the upper-case letter
|
|
396 is required at this position. The same word with a lower-case letter at this
|
|
397 position will not match. When some of the other letters are upper-case it will
|
|
398 not match either.
|
|
399
|
|
400 The same word with all upper-case characters will always be OK.
|
221
|
401
|
237
|
402 word list matches does not match ~
|
|
403 als als Als ALS ALs AlS aLs aLS
|
|
404 Als Als ALS als ALs AlS aLs aLS
|
|
405 ALS ALS als Als ALs AlS aLs aLS
|
|
406 AlS AlS ALS als Als ALs aLs aLS
|
221
|
407
|
314
|
408 The KEP affix ID can be used to specifically match a word with identical case
|
336
|
409 only, see below |spell-affix-KEP|.
|
308
|
410
|
237
|
411 Note in line 5 to 7 that non-word characters are used. You can include
|
|
412 any character in a word. When checking the text a word still only matches
|
|
413 when it appears with a non-word character before and after it. For Myspell a
|
|
414 word starting with a non-word character probably won't work.
|
|
415
|
|
416 After the word there is an optional slash and flags. Most of these flags are
|
|
417 letters that indicate the affixes that can be used with this word.
|
221
|
418
|
237
|
419 *spell-affix-vim*
|
314
|
420 A flag that Vim adds and is not in Myspell is the flag defined with KEP in the
|
308
|
421 affix file. This has the meaning that case matters. This can be used if the
|
|
422 word does not have the first letter in upper case at the start of a sentence.
|
314
|
423 Example (assuming that = was used for KEP):
|
237
|
424
|
|
425 word list matches does not match ~
|
|
426 's morgens/= 's morgens 'S morgens 's Morgens
|
|
427 's Morgens 's Morgens 'S morgens 's morgens
|
221
|
428
|
237
|
429 *spell-affix-mbyte*
|
|
430 The basic word list is normally in an 8-bit encoding, which is mentioned in
|
|
431 the affix file. The affix file must always be in the same encoding as the
|
|
432 word list. This is compatible with Myspell. For Vim the encoding may also be
|
|
433 something else, any encoding that "iconv" supports. The "SET" line must
|
|
434 specify the name of the encoding. When using a multi-byte encoding it's
|
|
435 possible to use more different affixes.
|
221
|
436
|
341
|
437
|
|
438 CHARACTER TABLES
|
258
|
439 *spell-affix-chars*
|
314
|
440 When using an 8-bit encoding the affix file should define what characters are
|
|
441 word characters (as specified with ENC). This is because the system where
|
|
442 ":mkspell" is used may not support a locale with this encoding and isalpha()
|
|
443 won't work. For example when using "cp1250" on Unix.
|
258
|
444
|
336
|
445 *E761* *E762* *spell-affix-FOL*
|
|
446 *spell-affix-LOW* *spell-affix-UPP*
|
258
|
447 Three lines in the affix file are needed. Simplistic example:
|
|
448
|
341
|
449 FOL áëñ ~
|
|
450 LOW áëñ ~
|
|
451 UPP ÁËÑ ~
|
258
|
452
|
|
453 All three lines must have exactly the same number of characters.
|
|
454
|
|
455 The "FOL" line specifies the case-folded characters. These are used to
|
|
456 compare words while ignoring case. For most encodings this is identical to
|
|
457 the lower case line.
|
|
458
|
|
459 The "LOW" line specifies the characters in lower-case. Mostly it's equal to
|
|
460 the "FOL" line.
|
|
461
|
|
462 The "UPP" line specifies the characters with upper-case. That is, a character
|
|
463 is upper-case where it's different from the character at the same position in
|
|
464 "FOL".
|
|
465
|
|
466 ASCII characters should be omitted, Vim always handles these in the same way.
|
|
467 When the encoding is UTF-8 no word characters need to be specified.
|
|
468
|
|
469 *E763*
|
|
470 All spell files for the same encoding must use the same word characters,
|
264
|
471 otherwise they can't be combined without errors. The XX.ascii.spl spell file
|
|
472 generated with the "-ascii" argument will not contain the table with
|
|
473 characters, so that it can be combine with spell files for any encoding.
|
258
|
474
|
341
|
475
|
|
476 AFFIXES
|
336
|
477 *spell-affix-PFX* *spell-affix-SFX*
|
341
|
478 The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell
|
|
479 documentation). Note that Myspell ignores any extra text after the relevant
|
|
480 info. Vim requires this text to start with a "#" so that mistakes don't go
|
|
481 unnoticed. Example:
|
|
482
|
|
483 SFX F 0 in [^i]n # Spion > Spionin ~
|
336
|
484
|
341
|
485 *spell-affix-PFXPOSTPONE*
|
|
486 When an affix file has very many prefixes that apply to many words it's not
|
|
487 possible to build the whole word list in memory. This applies to Hebrew (a
|
|
488 list with all words is over a Gbyte). In that case applying prefixes must be
|
|
489 postponed. This makes spell checking slower. It is indicated by this keyword
|
|
490 in the .aff file:
|
|
491
|
|
492 PFXPOSTPONE ~
|
|
493
|
|
494 Only prefixes without a chop string can be postponed, prefixes with a chop
|
|
495 string will still be included in the word list.
|
|
496
|
|
497
|
|
498 KEEP-CASE WORDS
|
314
|
499 *spell-affix-KEP*
|
|
500 In the affix file a KEP line can be used to define the affix name used for
|
308
|
501 keep-case words. Example:
|
|
502
|
314
|
503 KEP = ~
|
308
|
504
|
|
505 See above for an example |spell-affix-vim|.
|
|
506
|
341
|
507
|
|
508 RARE WORDS
|
314
|
509 *spell-affix-RAR*
|
308
|
510 In the affix file a RAR line can be used to define the affix name used for
|
|
511 rare words. Example:
|
|
512
|
|
513 RAR ? ~
|
|
514
|
|
515 Rare words are highlighted differently from bad words. This is to be used for
|
|
516 words that are correct for the language, but are hardly ever used and could be
|
|
517 a typing mistake anyway.
|
|
518
|
|
519
|
323
|
520 REPLACEMENTS *spell-affix-REP*
|
|
521
|
|
522 In the affix file REP items can be used to define common mistakes. This is
|
|
523 used to make spelling suggestions. The items define the "from" text and the
|
|
524 "to" replacement. Example:
|
|
525
|
|
526 REP 4 ~
|
|
527 REP f ph ~
|
|
528 REP ph f ~
|
|
529 REP k ch ~
|
|
530 REP ch k ~
|
|
531
|
|
532 The first line specifies the number of REP lines following. Vim ignores it.
|
|
533
|
|
534
|
|
535 SIMILAR CHARACTERS *spell-affix-MAP*
|
|
536
|
|
537 In the affix file MAP items can be used to define letters that very much
|
|
538 alike. This is mostly used for a letter with different accents. This is used
|
|
539 to prefer suggestions with these letters substituted. Example:
|
|
540
|
|
541 MAP 2 ~
|
|
542 MAP eéëêè ~
|
|
543 MAP uüùúû ~
|
|
544
|
|
545 The first line specifies the number of MAP lines following. Vim ignores it.
|
|
546
|
336
|
547 A letter must only appear in one of the MAP items. It's a bit more efficient
|
|
548 if the first letter is ASCII or at least one without accents.
|
|
549
|
323
|
550
|
|
551 SOUNDS-A-LIKE *spell-affix-SAL*
|
|
552
|
|
553 In the affix file SAL items can be used to define the sounds-a-like mechanism
|
|
554 to be used. The main items define the "from" text and the "to" replacement.
|
|
555 Example:
|
|
556
|
|
557 SAL CIA X ~
|
|
558 SAL CH X ~
|
|
559 SAL C K ~
|
|
560 SAL K K ~
|
|
561
|
|
562 TODO: explain how it works.
|
|
563
|
|
564 There are a few special items:
|
|
565
|
|
566 SAL followup true ~
|
|
567 SAL collapse_result true ~
|
|
568 SAL remove_accents true ~
|
|
569
|
|
570 "1" has the same meaning as "true". Any other value means "false".
|
|
571
|
221
|
572 vim:tw=78:sw=4:ts=8:ft=help:norl:
|