834
|
1 *spell.txt* For Vim version 7.0e. Last change: 2006 Apr 12
|
221
|
2
|
|
3
|
|
4 VIM REFERENCE MANUAL by Bram Moolenaar
|
|
5
|
|
6
|
|
7 Spell checking *spell*
|
|
8
|
|
9 1. Quick start |spell-quickstart|
|
378
|
10 2. Remarks on spell checking |spell-remarks|
|
|
11 3. Generating a spell file |spell-mkspell|
|
|
12 4. Spell file format |spell-file-format|
|
221
|
13
|
|
14 {Vi does not have any of these commands}
|
|
15
|
|
16 Spell checking is not available when the |+syntax| feature has been disabled
|
|
17 at compile time.
|
|
18
|
|
19 ==============================================================================
|
|
20 1. Quick start *spell-quickstart*
|
|
21
|
|
22 This command switches on spell checking: >
|
|
23
|
|
24 :setlocal spell spelllang=en_us
|
|
25
|
237
|
26 This switches on the 'spell' option and specifies to check for US English.
|
221
|
27
|
|
28 The words that are not recognized are highlighted with one of these:
|
333
|
29 SpellBad word not recognized |hl-SpellBad|
|
388
|
30 SpellCap word not capitalised |hl-SpellCap|
|
333
|
31 SpellRare rare word |hl-SpellRare|
|
|
32 SpellLocal wrong spelling for selected region |hl-SpellLocal|
|
221
|
33
|
237
|
34 Vim only checks words for spelling, there is no grammar check.
|
|
35
|
435
|
36 If the 'mousemodel' option is set to "popup" and the cursor is on a badly
|
|
37 spelled word or it is "popup_setpos" and the mouse pointer is on a badly
|
564
|
38 spelled word, then the popup menu will contain a submenu to replace the bad
|
435
|
39 word. Note: this slows down the appearance of the popup menu.
|
|
40
|
237
|
41 To search for the next misspelled word:
|
|
42
|
|
43 *]s* *E756*
|
|
44 ]s Move to next misspelled word after the cursor.
|
253
|
45 A count before the command can be used to repeat.
|
500
|
46 'wrapscan' applies.
|
237
|
47
|
|
48 *[s*
|
253
|
49 [s Like "]s" but search backwards, find the misspelled
|
348
|
50 word before the cursor. Doesn't recognize words
|
|
51 split over two lines, thus may stop at words that are
|
386
|
52 not highlighted as bad. Does not stop at word with
|
|
53 missing capital at the start of a line.
|
253
|
54
|
|
55 *]S*
|
|
56 ]S Like "]s" but only stop at bad words, not at rare
|
|
57 words or words for another region.
|
|
58
|
|
59 *[S*
|
|
60 [S Like "]S" but search backwards.
|
237
|
61
|
221
|
62
|
523
|
63 To add words to your own word list:
|
314
|
64
|
|
65 *zg*
|
386
|
66 zg Add word under the cursor as a good word to the first
|
501
|
67 name in 'spellfile'. A count may precede the command
|
|
68 to indicate the entry in 'spellfile' to be used. A
|
|
69 count of two uses the second entry.
|
|
70
|
|
71 In Visual mode the selected characters are added as a
|
|
72 word (including white space!).
|
|
73 When the cursor is on text that is marked as badly
|
|
74 spelled then the marked text is used.
|
|
75 Otherwise the word under the cursor, separated by
|
|
76 non-word characters, is used.
|
|
77
|
|
78 If the word is explicitly marked as bad word in
|
|
79 another spell file the result is unpredictable.
|
314
|
80
|
383
|
81 *zG*
|
386
|
82 zG Like "zg" but add the word to the internal word list
|
|
83 |internal-wordlist|.
|
383
|
84
|
314
|
85 *zw*
|
386
|
86 zw Like "zg" but mark the word as a wrong (bad) word.
|
712
|
87 If the word already appears in 'spellfile' it is
|
|
88 turned into a comment line. See |spellfile-cleanup|
|
|
89 for getting rid of those.
|
314
|
90
|
383
|
91 *zW*
|
386
|
92 zW Like "zw" but add the word to the internal word list
|
|
93 |internal-wordlist|.
|
383
|
94
|
712
|
95 zuw *zug* *zuw*
|
|
96 zug Undo |zw| and |zg|, remove the word from the entry in
|
|
97 'spellfile'. Count used as with |zg|.
|
|
98
|
|
99 zuW *zuG* *zuW*
|
|
100 zuG Undo |zW| and |zG|, remove the word from the internal
|
|
101 word list. Count used as with |zg|.
|
|
102
|
333
|
103 *:spe* *:spellgood*
|
386
|
104 :[count]spe[llgood] {word}
|
391
|
105 Add {word} as a good word to 'spellfile', like with
|
712
|
106 |zg|. Without count the first name is used, with a
|
386
|
107 count of two the second entry, etc.
|
314
|
108
|
391
|
109 :spe[llgood]! {word} Add {word} as a good word to the internal word list,
|
712
|
110 like with |zG|.
|
383
|
111
|
333
|
112 *:spellw* *:spellwrong*
|
386
|
113 :[count]spellw[rong] {word}
|
391
|
114 Add {word} as a wrong (bad) word to 'spellfile', as
|
712
|
115 with |zw|. Without count the first name is used, with
|
386
|
116 a count of two the second entry, etc.
|
314
|
117
|
391
|
118 :spellw[rong]! {word} Add {word} as a wrong (bad) word to the internal word
|
712
|
119 list, like with |zW|.
|
|
120
|
|
121 :[count]spellu[ndo] {word} *:spellu* *:spellundo*
|
|
122 Like |zuw|. [count] used as with |:spellgood|.
|
|
123
|
|
124 :spellu[ndo]! {word} Like |zuW|. [count] used as with |:spellgood|.
|
|
125
|
383
|
126
|
359
|
127 After adding a word to 'spellfile' with the above commands its associated
|
378
|
128 ".spl" file will automatically be updated and reloaded. If you change
|
|
129 'spellfile' manually you need to use the |:mkspell| command. This sequence of
|
|
130 commands mostly works well: >
|
386
|
131 :edit <file in 'spellfile'>
|
359
|
132 < (make changes to the spell file) >
|
|
133 :mkspell! %
|
|
134
|
|
135 More details about the 'spellfile' format below |spell-wordlist-format|.
|
314
|
136
|
386
|
137 *internal-wordlist*
|
383
|
138 The internal word list is used for all buffers where 'spell' is set. It is
|
|
139 not stored, it is lost when you exit Vim. It is also cleared when 'encoding'
|
|
140 is set.
|
|
141
|
314
|
142
|
323
|
143 Finding suggestions for bad words:
|
587
|
144 *z=*
|
|
145 z= For the word under/after the cursor suggest correctly
|
378
|
146 spelled words. This also works to find alternatives
|
|
147 for a word that is not highlighted as a bad word,
|
|
148 e.g., when the word after it is bad.
|
642
|
149 In Visual mode the highlighted text is taken as the
|
|
150 word to be replaced.
|
|
151 The results are sorted on similarity to the word being
|
|
152 replaced.
|
488
|
153 This may take a long time. Hit CTRL-C when you get
|
323
|
154 bored.
|
488
|
155
|
|
156 If the command is used without a count the
|
|
157 alternatives are listed and you can enter the number
|
|
158 of your choice or press <Enter> if you don't want to
|
|
159 replace. You can also use the mouse to click on your
|
|
160 choice (only works if the mouse can be used in Normal
|
|
161 mode and when there are no line wraps). Click on the
|
|
162 first line (the header) to cancel.
|
|
163
|
|
164 If a count is used that suggestion is used, without
|
587
|
165 prompting. For example, "1z=" always takes the first
|
488
|
166 suggestion.
|
|
167
|
|
168 If 'verbose' is non-zero a score will be displayed
|
|
169 with the suggestions to indicate the likeliness to the
|
|
170 badly spelled word (the higher the score the more
|
|
171 different).
|
344
|
172 When a word was replaced the redo command "." will
|
|
173 repeat the word replacement. This works like "ciw",
|
493
|
174 the good word and <Esc>. This does NOT work for Thai
|
|
175 and other languages without spaces between words.
|
344
|
176
|
374
|
177 *:spellr* *:spellrepall* *E752* *E753*
|
587
|
178 :spellr[epall] Repeat the replacement done by |z=| for all matches
|
374
|
179 with the replaced word in the current window.
|
|
180
|
477
|
181 In Insert mode, when the cursor is after a badly spelled word, you can use
|
|
182 CTRL-X s to find suggestions. This works like Insert mode completion. Use
|
|
183 CTRL-N to use the next suggestion, CTRL-P to go back. |i_CTRL-X_s|
|
|
184
|
344
|
185 The 'spellsuggest' option influences how the list of suggestions is generated
|
|
186 and sorted. See |'spellsuggest'|.
|
323
|
187
|
386
|
188 The 'spellcapcheck' option is used to check the first word of a sentence
|
|
189 starts with a capital. This doesn't work for the first word in the file.
|
|
190 When there is a line break right after a sentence the highlighting of the next
|
480
|
191 line may be postponed. Use |CTRL-L| when needed. Also see |set-spc-auto| for
|
|
192 how it can be set automatically when 'spelllang' is set.
|
386
|
193
|
625
|
194 Vim counts the number of times a good word is encountered. This is used to
|
|
195 sort the suggestions: words that have been seen before get a small bonus,
|
|
196 words that have been seen often get a bigger bonus. The COMMON item in the
|
|
197 affix file can be used to define common words, so that this mechanism also
|
|
198 works in a new or short file |spell-COMMON|.
|
|
199
|
378
|
200 ==============================================================================
|
|
201 2. Remarks on spell checking *spell-remarks*
|
323
|
202
|
227
|
203 PERFORMANCE
|
|
204
|
378
|
205 Vim does on-the-fly spell checking. To make this work fast the word list is
|
|
206 loaded in memory. Thus this uses a lot of memory (1 Mbyte or more). There
|
|
207 might also be a noticeable delay when the word list is loaded, which happens
|
|
208 when 'spell' is set and when 'spelllang' is set while 'spell' was already set.
|
|
209 To minimize the delay each word list is only loaded once, it is not deleted
|
|
210 when 'spelllang' is made empty or 'spell' is reset. When 'encoding' is set
|
|
211 all the word lists are reloaded, thus you may notice a delay then too.
|
227
|
212
|
|
213
|
221
|
214 REGIONS
|
|
215
|
|
216 A word may be spelled differently in various regions. For example, English
|
|
217 comes in (at least) these variants:
|
|
218
|
|
219 en all regions
|
247
|
220 en_au Australia
|
|
221 en_ca Canada
|
221
|
222 en_gb Great Britain
|
247
|
223 en_nz New Zealand
|
|
224 en_us USA
|
221
|
225
|
|
226 Words that are not used in one region but are used in another region are
|
333
|
227 highlighted with SpellLocal |hl-SpellLocal|.
|
221
|
228
|
237
|
229 Always use lowercase letters for the language and region names.
|
221
|
230
|
320
|
231 When adding a word with |zg| or another command it's always added for all
|
|
232 regions. You can change that by manually editing the 'spellfile'. See
|
389
|
233 |spell-wordlist-format|. Note that the regions as specified in the files in
|
564
|
234 'spellfile' are only used when all entries in 'spelllang' specify the same
|
389
|
235 region (not counting files specified by their .spl name).
|
320
|
236
|
482
|
237 *spell-german*
|
481
|
238 Specific exception: For German these special regions are used:
|
|
239 de all German words accepted
|
|
240 de_de old and new spelling
|
|
241 de_19 old spelling
|
|
242 de_20 new spelling
|
|
243 de_at Austria
|
|
244 de_ch Switzerland
|
|
245
|
504
|
246 *spell-russian*
|
|
247 Specific exception: For Russian these special regions are used:
|
|
248 ru all Russian words accepted
|
|
249 ru_ru "IE" letter spelling
|
|
250 ru_yo "YO" letter spelling
|
|
251
|
482
|
252 *spell-yiddish*
|
|
253 Yiddish requires using "utf-8" encoding, because of the special characters
|
|
254 used. If you are using latin1 Vim will use transliterated (romanized) Yiddish
|
|
255 instead. If you want to use transliterated Yiddish with utf-8 use "yi-tr".
|
|
256 In a table:
|
|
257 'encoding' 'spelllang'
|
|
258 utf-8 yi Yiddish
|
|
259 latin1 yi transliterated Yiddish
|
|
260 utf-8 yi-tr transliterated Yiddish
|
|
261
|
221
|
262
|
353
|
263 SPELL FILES *spell-load*
|
221
|
264
|
|
265 Vim searches for spell files in the "spell" subdirectory of the directories in
|
320
|
266 'runtimepath'. The name is: LL.EEE.spl, where:
|
237
|
267 LL the language name
|
|
268 EEE the value of 'encoding'
|
221
|
269
|
353
|
270 The value for "LL" comes from 'spelllang', but excludes the region name.
|
|
271 Examples:
|
|
272 'spelllang' LL ~
|
|
273 en_us en
|
|
274 en-rare en-rare
|
|
275 medical_ca medical
|
|
276
|
320
|
277 Only the first file is loaded, the one that is first in 'runtimepath'. If
|
|
278 this succeeds then additionally files with the name LL.EEE.add.spl are loaded.
|
|
279 All the ones that are found are used.
|
|
280
|
651
|
281 If no spell file is found the |SpellFileMissing| autocommand event is
|
|
282 triggered. This may trigger the |spellfile.vim| plugin to offer you
|
|
283 downloading the spell file.
|
|
284
|
386
|
285 Additionally, the files related to the names in 'spellfile' are loaded. These
|
|
286 are the files that |zg| and |zw| add good and wrong words to.
|
353
|
287
|
242
|
288 Exceptions:
|
|
289 - Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign doesn't
|
|
290 matter for spelling.
|
|
291 - When no spell file for 'encoding' is found "ascii" is tried. This only
|
|
292 works for languages where nearly all words are ASCII, such as English. It
|
|
293 helps when 'encoding' is not "latin1", such as iso-8859-2, and English text
|
320
|
294 is being edited. For the ".add" files the same name as the found main
|
|
295 spell file is used.
|
|
296
|
|
297 For example, with these values:
|
|
298 'runtimepath' is "~/.vim,/usr/share/vim70,~/.vim/after"
|
|
299 'encoding' is "iso-8859-2"
|
|
300 'spelllang' is "pl"
|
|
301
|
|
302 Vim will look for:
|
|
303 1. ~/.vim/spell/pl.iso-8859-2.spl
|
|
304 2. /usr/share/vim70/spell/pl.iso-8859-2.spl
|
|
305 3. ~/.vim/spell/pl.iso-8859-2.add.spl
|
|
306 4. /usr/share/vim70/spell/pl.iso-8859-2.add.spl
|
|
307 5. ~/.vim/after/spell/pl.iso-8859-2.add.spl
|
|
308
|
|
309 This assumes 1. is not found and 2. is found.
|
|
310
|
|
311 If 'encoding' is "latin1" Vim will look for:
|
|
312 1. ~/.vim/spell/pl.latin1.spl
|
|
313 2. /usr/share/vim70/spell/pl.latin1.spl
|
|
314 3. ~/.vim/after/spell/pl.latin1.spl
|
|
315 4. ~/.vim/spell/pl.ascii.spl
|
|
316 5. /usr/share/vim70/spell/pl.ascii.spl
|
|
317 6. ~/.vim/after/spell/pl.ascii.spl
|
|
318
|
|
319 This assumes none of them are found (Polish doesn't make sense when leaving
|
|
320 out the non-ASCII characters).
|
221
|
321
|
227
|
322 Spelling for EBCDIC is currently not supported.
|
|
323
|
237
|
324 A spell file might not be available in the current 'encoding'. See
|
|
325 |spell-mkspell| about how to create a spell file. Converting a spell file
|
242
|
326 with "iconv" will NOT work!
|
221
|
327
|
626
|
328 *spell-sug-file* *E781*
|
625
|
329 If there is a file with exactly the same name as the ".spl" file but ending in
|
|
330 ".sug", that file will be used for giving better suggestions. It isn't loaded
|
|
331 before suggestions are made to reduce memory use.
|
|
332
|
626
|
333 *E758* *E759* *E778* *E779* *E780* *E782*
|
237
|
334 When loading a spell file Vim checks that it is properly formatted. If you
|
242
|
335 get an error the file may be truncated, modified or intended for another Vim
|
|
336 version.
|
237
|
337
|
227
|
338
|
712
|
339 SPELLFILE CLEANUP *spellfile-cleanup*
|
|
340
|
|
341 The |zw| command turns existing entries in 'spellfile' into comment lines.
|
|
342 This avoids having to write a new file every time, but results in the file
|
|
343 only getting longer, never shorter. To clean up the comment lines in all
|
|
344 ".add" spell files do this: >
|
|
345 :runtime spell/cleanadd.vim
|
|
346
|
|
347 This deletes all comment lines, except the ones that start with "##". Use
|
|
348 "##" lines to add comments that you want to keep.
|
|
349
|
|
350 You can invoke this script as often as you like. A variable is provided to
|
|
351 skip updating files that have been changed recently. Set it to the number of
|
|
352 seconds that has passed since a file was changed before it will be cleaned.
|
|
353 For example, to clean only files that were not changed in the last hour: >
|
|
354 let g:spell_clean_limit = 60 * 60
|
|
355 The default is one second.
|
|
356
|
|
357
|
227
|
358 WORDS
|
|
359
|
|
360 Vim uses a fixed method to recognize a word. This is independent of
|
|
361 'iskeyword', so that it also works in help files and for languages that
|
|
362 include characters like '-' in 'iskeyword'. The word characters do depend on
|
|
363 'encoding'.
|
|
364
|
323
|
365 The table with word characters is stored in the main .spl file. Therefore it
|
|
366 matters what the current locale is when generating it! A .add.spl file does
|
359
|
367 not contain a word table though.
|
323
|
368
|
320
|
369 A word that starts with a digit is always ignored. That includes hex numbers
|
|
370 in the form 0xff and 0XFF.
|
227
|
371
|
|
372
|
348
|
373 WORD COMBINATIONS
|
|
374
|
|
375 It is possible to spell-check words that include a space. This is used to
|
|
376 recognize words that are invalid when used by themselves, e.g. for "et al.".
|
|
377 It can also be used to recognize "the the" and highlight it.
|
|
378
|
|
379 The number of spaces is irrelevant. In most cases a line break may also
|
|
380 appear. However, this makes it difficult to find out where to start checking
|
|
381 for spelling mistakes. When you make a change to one line and only that line
|
|
382 is redrawn Vim won't look in the previous line, thus when "et" is at the end
|
|
383 of the previous line "al." will be flagged as an error. And when you type
|
|
384 "the<CR>the" the highlighting doesn't appear until the first line is redrawn.
|
|
385 Use |CTRL-L| to redraw right away. "[s" will also stop at a word combination
|
|
386 with a line break.
|
|
387
|
|
388 When encountering a line break Vim skips characters such as '*', '>' and '"',
|
|
389 so that comments in C, shell and Vim code can be spell checked.
|
|
390
|
|
391
|
253
|
392 SYNTAX HIGHLIGHTING *spell-syntax*
|
227
|
393
|
|
394 Files that use syntax highlighting can specify where spell checking should be
|
|
395 done:
|
|
396
|
320
|
397 1. everywhere default
|
|
398 2. in specific items use "contains=@Spell"
|
|
399 3. everywhere but specific items use "contains=@NoSpell"
|
227
|
400
|
320
|
401 For the second method adding the @NoSpell cluster will disable spell checking
|
|
402 again. This can be used, for example, to add @Spell to the comments of a
|
|
403 program, and add @NoSpell for items that shouldn't be checked.
|
227
|
404
|
348
|
405
|
|
406 VIM SCRIPTS
|
|
407
|
|
408 If you want to write a Vim script that does something with spelling, you may
|
|
409 find these functions useful:
|
|
410
|
|
411 spellbadword() find badly spelled word at the cursor
|
|
412 spellsuggest() get list of spelling suggestions
|
378
|
413 soundfold() get the sound-a-like version of a word
|
348
|
414
|
480
|
415
|
|
416 SETTING 'spellcapcheck' AUTOMATICALLY *set-spc-auto*
|
|
417
|
|
418 After the 'spelllang' option has been set successfully, Vim will source the
|
|
419 files "spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
|
|
420 up to the first comma, dot or underscore. This can be used to set options
|
|
421 specifically for the language, especially 'spellcapcheck'.
|
|
422
|
|
423 The distribution includes a few of these files. Use this command to see what
|
|
424 they do: >
|
|
425 :next $VIMRUNTIME/spell/*.vim
|
|
426
|
|
427 Note that the default scripts don't set 'spellcapcheck' if it was changed from
|
|
428 the default value. This assumes the user prefers another value then.
|
|
429
|
481
|
430
|
|
431 DOUBLE SCORING *spell-double-scoring*
|
|
432
|
|
433 The 'spellsuggest' option can be used to select "double" scoring. This
|
|
434 mechanism is based on the principle that there are two kinds of spelling
|
|
435 mistakes:
|
|
436
|
|
437 1. You know how to spell the word, but mistype something. This results in a
|
|
438 small editing distance (character swapped/omitted/inserted) and possibly a
|
|
439 word that sounds completely different.
|
|
440
|
|
441 2. You don't know how to spell the word and type something that sounds right.
|
|
442 The edit distance can be big but the word is similar after sound-folding.
|
|
443
|
|
444 Since scores for these two mistakes will be very different we use a list
|
|
445 for each and mix them.
|
|
446
|
|
447 The sound-folding is slow and people that know the language won't make the
|
|
448 second kind of mistakes. Therefore 'spellsuggest' can be set to select the
|
|
449 preferred method for scoring the suggestions.
|
|
450
|
221
|
451 ==============================================================================
|
378
|
452 3. Generating a spell file *spell-mkspell*
|
237
|
453
|
|
454 Vim uses a binary file format for spelling. This greatly speeds up loading
|
|
455 the word list and keeps it small.
|
371
|
456 *.aff* *.dic* *Myspell*
|
237
|
457 You can create a Vim spell file from the .aff and .dic files that Myspell
|
|
458 uses. Myspell is used by OpenOffice.org and Mozilla. You should be able to
|
|
459 find them here:
|
|
460 http://lingucomponent.openoffice.org/spell_dic.html
|
348
|
461 You can also use a plain word list. The results are the same, the choice
|
378
|
462 depends on what word lists you can find.
|
221
|
463
|
388
|
464 If you install Aap (from www.a-a-p.org) you can use the recipes in the
|
|
465 runtime/spell/??/ directories. Aap will take care of downloading the files,
|
|
466 apply patches needed for Vim and build the .spl file.
|
|
467
|
341
|
468 Make sure your current locale is set properly, otherwise Vim doesn't know what
|
|
469 characters are upper/lower case letters. If the locale isn't available (e.g.,
|
|
470 when using an MS-Windows codepage on Unix) add tables to the .aff file
|
353
|
471 |spell-affix-chars|. If the .aff file doesn't define a table then the word
|
|
472 table of the currently active spelling is used. If spelling is not active
|
|
473 then Vim will try to guess.
|
341
|
474
|
353
|
475 *:mksp* *:mkspell*
|
|
476 :mksp[ell][!] [-ascii] {outname} {inname} ...
|
564
|
477 Generate a Vim spell file from word lists. Example: >
|
378
|
478 :mkspell /tmp/nl nl_NL.words
|
353
|
479 < *E751*
|
314
|
480 When {outname} ends in ".spl" it is used as the output
|
|
481 file name. Otherwise it should be a language name,
|
353
|
482 such as "en", without the region name. The file
|
|
483 written will be "{outname}.{encoding}.spl", where
|
|
484 {encoding} is the value of the 'encoding' option.
|
301
|
485
|
378
|
486 When the output file already exists [!] must be used
|
333
|
487 to overwrite it.
|
|
488
|
242
|
489 When the [-ascii] argument is present, words with
|
|
490 non-ascii characters are skipped. The resulting file
|
314
|
491 ends in "ascii.spl".
|
301
|
492
|
|
493 The input can be the Myspell format files {inname}.aff
|
|
494 and {inname}.dic. If {inname}.aff does not exist then
|
|
495 {inname} is used as the file name of a plain word
|
|
496 list.
|
|
497
|
237
|
498 Multiple {inname} arguments can be given to combine
|
|
499 regions into one Vim spell file. Example: >
|
|
500 :mkspell ~/.vim/spell/en /tmp/en_US /tmp/en_CA /tmp/en_AU
|
|
501 < This combines the English word lists for US, CA and AU
|
|
502 into one en.spl file.
|
819
|
503 Up to eight regions can be combined. *E754* *E755*
|
323
|
504 The REP and SAL items of the first .aff file where
|
493
|
505 they appear are used. |spell-REP| |spell-SAL|
|
237
|
506
|
348
|
507 This command uses a lot of memory, required to find
|
484
|
508 the optimal word tree (Polish, Italian and Hungarian
|
|
509 require several hundred Mbyte). The final result will
|
|
510 be much smaller, because compression is used. To
|
|
511 avoid running out of memory compression will be done
|
|
512 now and then. This can be tuned with the 'mkspellmem'
|
|
513 option.
|
348
|
514
|
378
|
515 After the spell file was written and it was being used
|
|
516 in a buffer it will be reloaded automatically.
|
308
|
517
|
371
|
518 :mksp[ell] [-ascii] {name}.{enc}.add
|
|
519 Like ":mkspell" above, using {name}.{enc}.add as the
|
378
|
520 input file and producing an output file in the same
|
|
521 directory that has ".spl" appended.
|
371
|
522
|
|
523 :mksp[ell] [-ascii] {name}
|
|
524 Like ":mkspell" above, using {name} as the input file
|
378
|
525 and producing an output file in the same directory
|
|
526 that has ".{enc}.spl" appended.
|
314
|
527
|
481
|
528 Vim will report the number of duplicate words. This might be a mistake in the
|
|
529 list of words. But sometimes it is used to have different prefixes and
|
|
530 suffixes for the same basic word to avoid them combining (e.g. Czech uses
|
484
|
531 this). If you want Vim to report all duplicate words set the 'verbose'
|
|
532 option.
|
481
|
533
|
314
|
534 Since you might want to change a Myspell word list for use with Vim the
|
|
535 following procedure is recommended:
|
237
|
536
|
|
537 1. Obtain the xx_YY.aff and xx_YY.dic files from Myspell.
|
|
538 2. Make a copy of these files to xx_YY.orig.aff and xx_YY.orig.dic.
|
|
539 3. Change the xx_YY.aff and xx_YY.dic files to remove bad words, add missing
|
258
|
540 words, define word characters with FOL/LOW/UPP, etc. The distributed
|
|
541 "src/spell/*.diff" files can be used.
|
378
|
542 4. Start Vim with the right locale and use |:mkspell| to generate the Vim
|
|
543 spell file.
|
|
544 5. Try out the spell file with ":set spell spelllang=xx" if you wrote it in
|
388
|
545 a spell directory in 'runtimepath', or ":set spelllang=xx.enc.spl" if you
|
378
|
546 wrote it somewhere else.
|
221
|
547
|
237
|
548 When the Myspell files are updated you can merge the differences:
|
258
|
549 1. Obtain the new Myspell files as xx_YY.new.aff and xx_UU.new.dic.
|
|
550 2. Use Vimdiff to see what changed: >
|
237
|
551 vimdiff xx_YY.orig.dic xx_YY.new.dic
|
258
|
552 3. Take over the changes you like in xx_YY.dic.
|
237
|
553 You may also need to change xx_YY.aff.
|
258
|
554 4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
|
237
|
555
|
353
|
556
|
484
|
557 SPELL FILE VERSIONS *E770* *E771* *E772*
|
|
558
|
|
559 Spell checking is a relatively new feature in Vim, thus it's possible that the
|
|
560 .spl file format will be changed to support more languages. Vim will check
|
|
561 the validity of the spell file and report anything wrong.
|
|
562
|
|
563 E771: Old spell file, needs to be updated ~
|
|
564 This spell file is older than your Vim. You need to update the .spl file.
|
|
565
|
|
566 E772: Spell file is for newer version of Vim ~
|
|
567 This means the spell file was made for a later version of Vim. You need to
|
|
568 update Vim.
|
|
569
|
|
570 E770: Unsupported section in spell file ~
|
|
571 This means the spell file was made for a later version of Vim and contains a
|
|
572 section that is required for the spell file to work. In this case it's
|
|
573 probably a good idea to upgrade your Vim.
|
|
574
|
|
575
|
353
|
576 SPELL FILE DUMP
|
|
577
|
|
578 If for some reason you want to check what words are supported by the currently
|
|
579 used spelling files, use this command:
|
|
580
|
|
581 *:spelldump* *:spelld*
|
|
582 :spelld[ump] Open a new window and fill it with all currently valid
|
500
|
583 words. Compound words are not included.
|
378
|
584 Note: For some languages the result may be enormous,
|
|
585 causing Vim to run out of memory.
|
353
|
586
|
625
|
587 :spelld[ump]! Like ":spelldump" and include the word count. This is
|
|
588 the number of times the word was found while
|
|
589 updating the screen. Words that are in COMMON items
|
|
590 get a starting count of 10.
|
|
591
|
353
|
592 The format of the word list is used |spell-wordlist-format|. You should be
|
|
593 able to read it with ":mkspell" to generate one .spl file that includes all
|
|
594 the words.
|
|
595
|
383
|
596 When all entries to 'spelllang' use the same regions or no regions at all then
|
|
597 the region information is included in the dumped words. Otherwise only words
|
|
598 for the current region are included and no "/regions" line is generated.
|
353
|
599
|
378
|
600 Comment lines with the name of the .spl file are used as a header above the
|
|
601 words that were generated from that .spl file.
|
353
|
602
|
651
|
603
|
|
604 SPELL FILE MISSING *spell-SpellFileMissing* *spellfile.vim*
|
|
605
|
|
606 If the spell file for the language you are using is not available, you will
|
|
607 get an error message. But if the "spellfile.vim" plugin is active it will
|
|
608 offer you to download the spell file. Just follow the instructions, it will
|
|
609 ask you where to write the file.
|
|
610
|
|
611 The plugin has a default place where to look for spell files, on the Vim ftp
|
|
612 server. If you want to use another location or another protocol, set the
|
|
613 g:spellfile_URL variable to the directory that holds the spell files. The
|
|
614 |netrw| plugin is used for getting the file, look there for the speficic
|
|
615 syntax of the URL. Example: >
|
|
616 let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
|
|
617 You may need to escape special characters.
|
|
618
|
|
619 The plugin will only ask about downloading a language once. If you want to
|
|
620 try again anyway restart Vim, or set g:spellfile_URL to another value (e.g.,
|
|
621 prepend a space).
|
|
622
|
|
623 To avoid using the "spellfile.vim" plugin do this in your vimrc file: >
|
|
624
|
|
625 let loaded_spellfile_plugin = 1
|
|
626
|
|
627 Instead of using the plugin you can define a |SpellFileMissing| autocommand to
|
|
628 handle the missing file yourself. You can use it like this: >
|
|
629
|
|
630 :au SpellFileMissing * call Download_spell_file(expand('<amatch>'))
|
|
631
|
|
632 Thus the <amatch> item contains the name of the language. Another important
|
|
633 value is 'encoding', since every encoding has its own spell file. With two
|
|
634 exceptions:
|
|
635 - For ISO-8859-15 (latin9) the name "latin1" is used (the encodings only
|
|
636 differ in characters not used in dictionary words).
|
|
637 - The name "ascii" may also be used for some languages where the words use
|
|
638 only ASCII letters for most of the words.
|
|
639
|
|
640 The default "spellfile.vim" plugin uses this autocommand, if you define your
|
|
641 autocommand afterwars you may want to use ":au! SpellFileMissing" to overrule
|
|
642 it. If you define your autocommand before the plugin is loaded it will notice
|
|
643 this and not do anything.
|
|
644
|
237
|
645 ==============================================================================
|
378
|
646 4. Spell file format *spell-file-format*
|
237
|
647
|
|
648 This is the format of the files that are used by the person who creates and
|
|
649 maintains a word list.
|
221
|
650
|
237
|
651 Note that we avoid the word "dictionary" here. That is because the goal of
|
|
652 spell checking differs from writing a dictionary (as in the book). For
|
564
|
653 spelling we need a list of words that are OK, thus should not be highlighted.
|
|
654 Person and company names will not appear in a dictionary, but do appear in a
|
|
655 word list. And some old words are rarely used while they are common
|
|
656 misspellings. These do appear in a dictionary but not in a word list.
|
237
|
657
|
388
|
658 There are two formats: A straight list of words and a list using affix
|
378
|
659 compression. The files with affix compression are used by Myspell (Mozilla
|
|
660 and OpenOffice.org). This requires two files, one with .aff and one with .dic
|
|
661 extension.
|
301
|
662
|
|
663
|
378
|
664 FORMAT OF STRAIGHT WORD LIST *spell-wordlist-format*
|
301
|
665
|
314
|
666 The words must appear one per line. That is all that is required.
|
378
|
667
|
314
|
668 Additionally the following items are recognized:
|
378
|
669
|
301
|
670 - Empty and blank lines are ignored.
|
378
|
671
|
625
|
672 # comment ~
|
301
|
673 - Lines starting with a # are ignored (comment lines).
|
378
|
674
|
625
|
675 /encoding=utf-8 ~
|
308
|
676 - A line starting with "/encoding=", before any word, specifies the encoding
|
|
677 of the file. After the second '=' comes an encoding name. This tells Vim
|
378
|
678 to setup conversion from the specified encoding to 'encoding'. Thus you can
|
|
679 use one word list for several target encodings.
|
|
680
|
625
|
681 /regions=usca ~
|
320
|
682 - A line starting with "/regions=" specifies the region names that are
|
|
683 supported. Each region name must be two ASCII letters. The first one is
|
|
684 region 1. Thus "/regions=usca" has region 1 "us" and region 2 "ca".
|
378
|
685 In an addition word list the region names should be equal to the main word
|
|
686 list!
|
|
687
|
314
|
688 - Other lines starting with '/' are reserved for future use. The ones that
|
625
|
689 are not recognized are ignored. You do get a warning message, so that you
|
|
690 know something won't work.
|
301
|
691
|
383
|
692 - A "/" may follow the word with the following items:
|
|
693 = Case must match exactly.
|
|
694 ? Rare word.
|
|
695 ! Bad (wrong) word.
|
|
696 digit A region in which the word is valid. If no regions are
|
|
697 specified the word is valid in all regions.
|
|
698
|
320
|
699 Example:
|
|
700
|
|
701 # This is an example word list comment
|
|
702 /encoding=latin1 encoding of the file
|
|
703 /regions=uscagb regions "us", "ca" and "gb"
|
|
704 example word for all regions
|
383
|
705 blah/12 word for regions "us" and "ca"
|
|
706 vim/! bad word
|
|
707 Campbell/?3 rare word in region 3 "gb"
|
|
708 's mornings/= keep-case word
|
320
|
709
|
389
|
710 Note that when "/=" is used the same word with all upper-case letters is not
|
|
711 accepted. This is different from a word with mixed case that is automatically
|
|
712 marked as keep-case, those words may appear in all upper-case letters.
|
|
713
|
301
|
714
|
820
|
715 FORMAT WITH .AFF AND .DIC FILES *aff-dic-format*
|
301
|
716
|
625
|
717 There are two files: the basic word list and an affix file. The affix file
|
|
718 specifies settings for the language and can contain affixes. The affixes are
|
237
|
719 used to modify the basic words to get the full word list. This significantly
|
|
720 reduces the number of words, especially for a language like Polish. This is
|
|
721 called affix compression.
|
221
|
722
|
625
|
723 The basic word list and the affix file are combined with the ":mkspell"
|
|
724 command and results in a binary spell file. All the preprocessing has been
|
|
725 done, thus this file loads fast. The binary spell file format is described in
|
|
726 the source code (src/spell.c). But only developers need to know about it.
|
221
|
727
|
237
|
728 The preprocessing also allows us to take the Myspell language files and modify
|
|
729 them before the Vim word list is made. The tools for this can be found in the
|
|
730 "src/spell" directory.
|
|
731
|
493
|
732 The format for the affix and word list files is based on what Myspell uses
|
|
733 (the spell checker of Mozilla and OpenOffice.org). A description can be found
|
|
734 here:
|
|
735 http://lingucomponent.openoffice.org/affix.readme ~
|
|
736 Note that affixes are case sensitive, this isn't obvious from the description.
|
|
737
|
|
738 Vim supports quite a few extras. They are described below |spell-affix-vim|.
|
|
739 Attempts have been made to keep this compatible with other spell checkers, so
|
625
|
740 that the same files can often be used. One other project that offers more
|
|
741 than Myspell is Hunspell ( http://hunspell.sf.net ).
|
493
|
742
|
237
|
743
|
320
|
744 WORD LIST FORMAT *spell-dic-format*
|
237
|
745
|
625
|
746 A short example, with line numbers:
|
221
|
747
|
625
|
748 1 1234 ~
|
|
749 2 aan ~
|
|
750 3 Als ~
|
|
751 4 Etten-Leur ~
|
|
752 5 et al. ~
|
|
753 6 's-Gravenhage ~
|
|
754 7 's-Gravenhaags ~
|
|
755 8 # word that differs between regions ~
|
|
756 9 kado/1 ~
|
|
757 10 cadeau/2 ~
|
|
758 11 TCP,IP ~
|
|
759 12 /the S affix may add a 's' ~
|
|
760 13 bedel/S ~
|
237
|
761
|
314
|
762 The first line contains the number of words. Vim ignores it, but you do get
|
|
763 an error message if it's not there. *E760*
|
221
|
764
|
625
|
765 What follows is one word per line. White space at the end of the line is
|
|
766 ignored, all other white space matters. The encoding is specified in the
|
|
767 affix file |spell-SET|.
|
|
768
|
|
769 Comment lines start with '#' or '/'. See the example lines 8 and 12. Note
|
|
770 that putting a comment after a word is NOT allowed:
|
|
771
|
|
772 someword # comment that causes an error! ~
|
|
773
|
|
774 After the word there is an optional slash and flags. Most of these flags are
|
|
775 letters that indicate the affixes that can be used with this word. These are
|
|
776 specified with SFX and PFX lines in the .aff file, see |spell-SFX| and
|
|
777 |spell-PFX|. Vim allows using other flag types with the FLAG item in the
|
|
778 affix file |spell-FLAG|.
|
237
|
779
|
|
780 When the word only has lower-case letters it will also match with the word
|
|
781 starting with an upper-case letter.
|
|
782
|
|
783 When the word includes an upper-case letter, this means the upper-case letter
|
|
784 is required at this position. The same word with a lower-case letter at this
|
|
785 position will not match. When some of the other letters are upper-case it will
|
|
786 not match either.
|
|
787
|
625
|
788 The word with all upper-case characters will always be OK,
|
221
|
789
|
237
|
790 word list matches does not match ~
|
|
791 als als Als ALS ALs AlS aLs aLS
|
|
792 Als Als ALS als ALs AlS aLs aLS
|
|
793 ALS ALS als Als ALs AlS aLs aLS
|
|
794 AlS AlS ALS als Als ALs aLs aLS
|
221
|
795
|
624
|
796 The KEEPCASE affix ID can be used to specifically match a word with identical
|
|
797 case only, see below |spell-KEEPCASE|.
|
308
|
798
|
625
|
799 Note: in line 5 to 7 non-word characters are used. You can include any
|
|
800 character in a word. When checking the text a word still only matches when it
|
|
801 appears with a non-word character before and after it. For Myspell a word
|
|
802 starting with a non-word character probably won't work.
|
237
|
803
|
493
|
804 In line 12 the word "TCP/IP" is defined. Since the slash has a special
|
|
805 meaning the comma is used instead. This is defined with the SLASH item in the
|
625
|
806 affix file, see |spell-SLASH|. Note that without this SLASH item the word
|
|
807 will be "TCP,IP".
|
|
808
|
|
809
|
|
810 AFFIX FILE FORMAT *spell-aff-format* *spell-affix-vim*
|
493
|
811
|
625
|
812 *spell-affix-comment*
|
|
813 Comment lines in the .aff file start with a '#':
|
|
814
|
|
815 # comment line ~
|
|
816
|
|
817 With some items it's also possible to put a comment after it, but this isn't
|
|
818 supported in general.
|
|
819
|
|
820
|
|
821 ENCODING *spell-SET*
|
237
|
822
|
625
|
823 The affix file can be in any encoding that is supported by "iconv". However,
|
|
824 in some cases the current locale should also be set properly at the time
|
|
825 |:mkspell| is invoked. Adding FOL/LOW/UPP lines removes this requirement
|
|
826 |spell-FOL|.
|
389
|
827
|
625
|
828 The encoding should be specified before anything where the encoding matters.
|
|
829 The encoding applies both to the affix file and the dictionary file. It is
|
|
830 done with a SET line:
|
221
|
831
|
625
|
832 SET utf-8 ~
|
|
833
|
|
834 The encoding can be different from the value of the 'encoding' option at the
|
|
835 time ":mkspell" is used. Vim will then convert everything to 'encoding' and
|
|
836 generate a spell file for 'encoding'. If some of the used characters to not
|
|
837 fit in 'encoding' you will get an error message.
|
237
|
838 *spell-affix-mbyte*
|
625
|
839 When using a multi-byte encoding it's possible to use more different affix
|
|
840 flags. But Myspell doesn't support that, thus you may not want to use it
|
|
841 anyway. For compatibility use an 8-bit encoding.
|
221
|
842
|
341
|
843
|
714
|
844 INFORMATION
|
|
845
|
|
846 These entries in the affix file can be used to add information to the spell
|
|
847 file. There are no restrictions on the format, but they should be in the
|
|
848 right encoding.
|
|
849
|
|
850 *spell-NAME* *spell-VERSION* *spell-HOME*
|
|
851 *spell-AUTHOR* *spell-EMAIL* *spell-COPYRIGHT*
|
|
852 NAME Name of the language
|
|
853 VERSION 1.0.1 with fixes
|
|
854 HOME http://www.myhome.eu
|
|
855 AUTHOR John Doe
|
|
856 EMAIL john AT Doe DOT net
|
|
857 COPYRIGHT LGPL
|
|
858
|
|
859 These fields are put in the .spl file as-is. The |:spellinfo| command can be
|
|
860 used to view the info.
|
|
861
|
|
862 *:spellinfo* *:spelli*
|
|
863 :spelli[nfo] Display the information for the spell file(s) used for
|
|
864 the current buffer.
|
|
865
|
|
866
|
341
|
867 CHARACTER TABLES
|
258
|
868 *spell-affix-chars*
|
314
|
869 When using an 8-bit encoding the affix file should define what characters are
|
625
|
870 word characters. This is because the system where ":mkspell" is used may not
|
|
871 support a locale with this encoding and isalpha() won't work. For example
|
|
872 when using "cp1250" on Unix.
|
493
|
873 *E761* *E762* *spell-FOL*
|
|
874 *spell-LOW* *spell-UPP*
|
258
|
875 Three lines in the affix file are needed. Simplistic example:
|
|
876
|
341
|
877 FOL áëñ ~
|
|
878 LOW áëñ ~
|
|
879 UPP ÁËÑ ~
|
258
|
880
|
|
881 All three lines must have exactly the same number of characters.
|
|
882
|
|
883 The "FOL" line specifies the case-folded characters. These are used to
|
|
884 compare words while ignoring case. For most encodings this is identical to
|
|
885 the lower case line.
|
|
886
|
|
887 The "LOW" line specifies the characters in lower-case. Mostly it's equal to
|
|
888 the "FOL" line.
|
|
889
|
|
890 The "UPP" line specifies the characters with upper-case. That is, a character
|
|
891 is upper-case where it's different from the character at the same position in
|
|
892 "FOL".
|
|
893
|
493
|
894 An exception is made for the German sharp s ß. The upper-case version is
|
|
895 "SS". In the FOL/LOW/UPP lines it should be included, so that it's recognized
|
|
896 as a word character, but use the ß character in all three.
|
|
897
|
258
|
898 ASCII characters should be omitted, Vim always handles these in the same way.
|
|
899 When the encoding is UTF-8 no word characters need to be specified.
|
|
900
|
|
901 *E763*
|
353
|
902 Vim allows you to use spell checking for several languages in the same file.
|
|
903 You can list them in the 'spelllang' option. As a consequence all spell files
|
|
904 for the same encoding must use the same word characters, otherwise they can't
|
|
905 be combined without errors. If you get a warning that the word tables differ
|
|
906 you may need to generate the .spl file again with |:mkspell|. Check the FOL,
|
|
907 LOW and UPP lines in the used .aff file.
|
|
908
|
|
909 The XX.ascii.spl spell file generated with the "-ascii" argument will not
|
|
910 contain the table with characters, so that it can be combine with spell files
|
|
911 for any encoding. The .add.spl files also do not contain the table.
|
258
|
912
|
341
|
913
|
371
|
914 MID-WORD CHARACTERS
|
|
915 *spell-midword*
|
|
916 Some characters are only to be considered word characters if they are used in
|
|
917 between two ordinary word characters. An example is the single quote: It is
|
|
918 often used to put text in quotes, thus it can't be recognized as a word
|
|
919 character, but when it appears in between word characters it must be part of
|
|
920 the word. This is needed to detect a spelling error such as they'are. That
|
|
921 should be they're, but since "they" and "are" are words themselves that would
|
|
922 go unnoticed.
|
|
923
|
625
|
924 These characters are defined with MIDWORD in the .aff file. Example:
|
371
|
925
|
|
926 MIDWORD '- ~
|
|
927
|
|
928
|
497
|
929 FLAG TYPES *spell-FLAG*
|
|
930
|
|
931 Flags are used to specify the affixes that can be used with a word and for
|
|
932 other properties of the word. Normally single-character flags are used. This
|
|
933 limits the number of possible flags, especially for 8-bit encodings. The FLAG
|
|
934 item can be used if more affixes are to be used. Possible values:
|
|
935
|
|
936 FLAG long use two-character flags
|
|
937 FLAG num use numbers, from 1 up to 65000
|
499
|
938 FLAG caplong use one-character flags without A-Z and two-character
|
497
|
939 flags that start with A-Z
|
|
940
|
|
941 With "FLAG num" the numbers in a list of affixes need to be separated with a
|
|
942 comma: "234,2143,1435". This method is inefficient, but useful if the file is
|
|
943 generated with a program.
|
|
944
|
499
|
945 When using "caplong" the two-character flags all start with a capital: "Aa",
|
|
946 "B1", "BB", etc. This is useful to use one-character flags for the most
|
|
947 common items and two-character flags for uncommon items.
|
497
|
948
|
|
949 Note: When using utf-8 only characters up to 65000 may be used for flags.
|
|
950
|
|
951
|
341
|
952 AFFIXES
|
493
|
953 *spell-PFX* *spell-SFX*
|
341
|
954 The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell
|
371
|
955 documentation or the Aspell manual:
|
|
956 http://aspell.net/man-html/Affix-Compression.html).
|
|
957
|
625
|
958 Summary:
|
|
959 SFX L Y 2 ~
|
|
960 SFX L 0 re [^x] ~
|
|
961 SFX L 0 ro x ~
|
|
962
|
|
963 The first line is a header and has four fields:
|
|
964 SFX {flag} {combine} {count}
|
|
965
|
|
966 {flag} The name used for the suffix. Mostly it's a single letter,
|
|
967 but other characters can be used, see |spell-FLAG|.
|
|
968
|
|
969 {combine} Can be 'Y' or 'N'. When 'Y' then the word plus suffix can
|
|
970 also have a prefix. When 'N' then a prefix is not allowed.
|
|
971
|
|
972 {count} The number of lines following. If this is wrong you will get
|
|
973 an error message.
|
|
974
|
|
975 For PFX the fields are exactly the same.
|
|
976
|
|
977 The basic format for the following lines is:
|
809
|
978 SFX {flag} {strip} {add} {condition} {extra}
|
625
|
979
|
|
980 {flag} Must be the same as the {flag} used in the first line.
|
|
981
|
|
982 {strip} Characters removed from the basic word. There is no check if
|
|
983 the characters are actually there, only the length is used (in
|
|
984 bytes). This better match the {condition}, otherwise strange
|
|
985 things may happen. If the {strip} length is equal to or
|
|
986 longer than the basic word the suffix won't be used.
|
|
987 When {strip} is 0 (zero) then nothing is stripped.
|
|
988
|
|
989 {add} Characters added to the basic word, after removing {strip}.
|
809
|
990 Optionally there is a '/' followed by flags. The flags apply
|
|
991 to the word plus affix. See |spell-affix-flags|
|
625
|
992
|
|
993 {condition} A simplistic pattern. Only when this matches with a basic
|
|
994 word will the suffix be used for that word. This is normally
|
|
995 for using one suffix letter with different {add} and {strip}
|
|
996 fields for words with different endings.
|
|
997 When {condition} is a . (dot) there is no condition.
|
|
998 The pattern may contain:
|
|
999 - Literal characters.
|
|
1000 - A set of characters in []. [abc] matches a, b and c.
|
|
1001 A dash is allowed for a range [a-c], but this is
|
|
1002 Vim-specific.
|
|
1003 - A set of characters that starts with a ^, meaning the
|
|
1004 complement of the specified characters. [^abc] matches any
|
|
1005 character but a, b and c.
|
|
1006
|
809
|
1007 {extra} Optional extra text:
|
|
1008 # comment Comment is ignored
|
|
1009 - Hunspell uses this, ignored
|
|
1010
|
625
|
1011 For PFX the fields are the same, but the {strip}, {add} and {condition} apply
|
|
1012 to the start of the word.
|
|
1013
|
|
1014 Note: Myspell ignores any extra text after the relevant info. Vim requires
|
|
1015 this text to start with a "#" so that mistakes don't go unnoticed. Example:
|
371
|
1016
|
|
1017 SFX F 0 in [^i]n # Spion > Spionin ~
|
|
1018 SFX F 0 nen in # Bauerin > Bauerinnen ~
|
341
|
1019
|
499
|
1020 Apparently Myspell allows an affix name to appear more than once. Since this
|
|
1021 might also be a mistake, Vim checks for an extra "S". The affix files for
|
|
1022 Myspell that use this feature apparently have this flag. Example:
|
|
1023
|
|
1024 SFX a Y 1 S ~
|
|
1025 SFX a 0 an . ~
|
|
1026
|
|
1027 SFX a Y 2 S ~
|
|
1028 SFX a 0 en . ~
|
|
1029 SFX a 0 on . ~
|
|
1030
|
625
|
1031
|
|
1032 AFFIX FLAGS *spell-affix-flags*
|
|
1033
|
|
1034 This is a feature that comes from Hunspell: The affix may specify flags. This
|
|
1035 works similar to flags specified on a basic word. The flags apply to the
|
820
|
1036 basic word plus the affix (but there are restrictions). Example:
|
625
|
1037
|
|
1038 SFX S Y 1 ~
|
|
1039 SFX S 0 s . ~
|
|
1040
|
|
1041 SFX A Y 1 ~
|
|
1042 SFX A 0 able/S . ~
|
|
1043
|
|
1044 When the dictionary file contains "drink/AS" then these words are possible:
|
|
1045
|
|
1046 drink
|
|
1047 drinks uses S suffix
|
|
1048 drinkable uses A suffix
|
|
1049 drinkables uses A suffix and then S suffix
|
|
1050
|
|
1051 Generally the flags of the suffix are added to the flags of the basic word,
|
|
1052 both are used for the word plus suffix. But the flags of the basic word are
|
|
1053 only used once for affixes, except that both one prefix and one suffix can be
|
|
1054 used when both support combining.
|
|
1055
|
|
1056 Specifically, the affix flags can be used for:
|
820
|
1057 - Suffixes on suffixes, as in the example above. This works once, thus you
|
|
1058 can have two suffixes on a word (plus one prefix).
|
625
|
1059 - Making the word with the affix rare, by using the |spell-RARE| flag.
|
|
1060 - Exclude the word with the affix from compounding, by using the
|
|
1061 |spell-COMPOUNDFORBIDFLAG| flag.
|
819
|
1062 - Allow the word with the affix to be part of a compound word on the side of
|
|
1063 the affix with the |spell-COMPOUNDPERMITFLAG|.
|
820
|
1064 - Use the NEEDCOMPOUND flag: word plus affix can only be used as part of a
|
|
1065 compound word. |spell-NEEDCOMPOUND|
|
|
1066 - Compound flags: word plus affix can be part of a compound word at the end,
|
|
1067 middle, start, etc. The flags are combined with the flags of the basic
|
|
1068 word. |spell-compound|
|
|
1069 - NEEDAFFIX: another affix is needed to make a valid word.
|
|
1070 - CIRCUMFIX, as explained just below.
|
484
|
1071
|
820
|
1072
|
|
1073 CIRCUMFIX *spell-CIRCUMFIX*
|
|
1074
|
|
1075 The CIRCUMFIX flag means a prefix and suffix must be added at the same time.
|
|
1076 If a prefix has the CIRCUMFIX flag than only suffixes with the CIRCUMFIX flag
|
|
1077 can be added, and the other way around.
|
|
1078 An alternative is to only specify the suffix, and give the that suffix two
|
|
1079 flags: The required prefix and the NEEDAFFIX flag. |spell-NEEDAFFIX|
|
|
1080
|
|
1081
|
|
1082 PFXPOSTPONE *spell-PFXPOSTPONE*
|
|
1083
|
341
|
1084 When an affix file has very many prefixes that apply to many words it's not
|
|
1085 possible to build the whole word list in memory. This applies to Hebrew (a
|
|
1086 list with all words is over a Gbyte). In that case applying prefixes must be
|
|
1087 postponed. This makes spell checking slower. It is indicated by this keyword
|
|
1088 in the .aff file:
|
|
1089
|
|
1090 PFXPOSTPONE ~
|
|
1091
|
820
|
1092 Only prefixes without a chop string and without flags can be postponed.
|
|
1093 Prefixes with a chop string or with flags will still be included in the word
|
|
1094 list. An exception if the chop string is one character and equal to the last
|
|
1095 character of the added string, but in lower case. Thus when the chop string
|
|
1096 is used to allow the following word to start with an upper case letter.
|
341
|
1097
|
481
|
1098
|
493
|
1099 WORDS WITH A SLASH *spell-SLASH*
|
481
|
1100
|
|
1101 The slash is used in the .dic file to separate the basic word from the affix
|
640
|
1102 letters and other flags. Unfortunately, this means you cannot use a slash in
|
|
1103 a word. Thus "TCP/IP" is not a word but "TCP with the flags "IP". To include
|
|
1104 a slash in the word put a backslash before it: "TCP\/IP". In the rare case
|
|
1105 you want to use a backslash inside a word you need to use two backslashes.
|
|
1106 Any other use of the backslash is reserved for future expansion.
|
481
|
1107
|
|
1108
|
624
|
1109 KEEP-CASE WORDS *spell-KEEPCASE*
|
481
|
1110
|
624
|
1111 In the affix file a KEEPCASE line can be used to define the affix name used
|
|
1112 for keep-case words. Example:
|
308
|
1113
|
624
|
1114 KEEPCASE = ~
|
308
|
1115
|
625
|
1116 This flag is not supported by Myspell. It has the meaning that case matters.
|
|
1117 This can be used if the word does not have the first letter in upper case at
|
|
1118 the start of a sentence. Example:
|
|
1119
|
|
1120 word list matches does not match ~
|
|
1121 's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS
|
|
1122 's Morgens 's Morgens 'S MORGENS 'S morgens 's morgens
|
|
1123
|
|
1124 The flag can also be used to avoid that the word matches when it is in all
|
|
1125 upper-case letters.
|
308
|
1126
|
341
|
1127
|
624
|
1128 RARE WORDS *spell-RARE*
|
481
|
1129
|
624
|
1130 In the affix file a RARE line can be used to define the affix name used for
|
308
|
1131 rare words. Example:
|
|
1132
|
624
|
1133 RARE ? ~
|
308
|
1134
|
|
1135 Rare words are highlighted differently from bad words. This is to be used for
|
|
1136 words that are correct for the language, but are hardly ever used and could be
|
348
|
1137 a typing mistake anyway. When the same word is found as good it won't be
|
|
1138 highlighted as rare.
|
|
1139
|
819
|
1140 This flag can also be used on an affix, so that a basic word is not rare but
|
|
1141 the basic word plus affix is rare |spell-affix-flags|. However, if the word
|
|
1142 also appears as a good word in another way (e.g., in another region) it won't
|
|
1143 be marked as rare.
|
|
1144
|
348
|
1145
|
493
|
1146 BAD WORDS *spell-BAD*
|
481
|
1147
|
348
|
1148 In the affix file a BAD line can be used to define the affix name used for
|
|
1149 bad words. Example:
|
|
1150
|
|
1151 BAD ! ~
|
|
1152
|
|
1153 This can be used to exclude words that would otherwise be good. For example
|
371
|
1154 "the the" in the .dic file:
|
|
1155
|
|
1156 the the/! ~
|
|
1157
|
|
1158 Once a word has been marked as bad it won't be undone by encountering the same
|
|
1159 word as good.
|
308
|
1160
|
625
|
1161 The flag also applies to the word with affixes, thus this can be used to mark
|
|
1162 a whole bunch of related words as bad.
|
|
1163
|
493
|
1164 *spell-NEEDAFFIX*
|
484
|
1165 The NEEDAFFIX flag is used to require that a word is used with an affix. The
|
625
|
1166 word itself is not a good word (unless there is an empty affix). Example:
|
484
|
1167
|
|
1168 NEEDAFFIX + ~
|
|
1169
|
308
|
1170
|
493
|
1171 COMPOUND WORDS *spell-compound*
|
481
|
1172
|
484
|
1173 A compound word is a longer word made by concatenating words that appear in
|
|
1174 the .dic file. To specify which words may be concatenated a character is
|
|
1175 used. This character is put in the list of affixes after the word. We will
|
|
1176 call this character a flag here. Obviously these flags must be different from
|
|
1177 any affix IDs used.
|
481
|
1178
|
|
1179 *spell-COMPOUNDFLAG*
|
625
|
1180 The Myspell compatible method uses one flag, specified with COMPOUNDFLAG. All
|
|
1181 words with this flag combine in any order. This means there is no control
|
484
|
1182 over which word comes first. Example:
|
481
|
1183 COMPOUNDFLAG c ~
|
|
1184
|
714
|
1185 *spell-COMPOUNDRULE*
|
484
|
1186 A more advanced method to specify how compound words can be formed uses
|
|
1187 multiple items with multiple flags. This is not compatible with Myspell 3.0.
|
|
1188 Let's start with an example:
|
714
|
1189 COMPOUNDRULE c+ ~
|
|
1190 COMPOUNDRULE se ~
|
481
|
1191
|
484
|
1192 The first line defines that words with the "c" flag can be concatenated in any
|
|
1193 order. The second line defines compound words that are made of one word with
|
|
1194 the "s" flag and one word with the "e" flag. With this dictionary:
|
|
1195 bork/c ~
|
|
1196 onion/s ~
|
|
1197 soup/e ~
|
481
|
1198
|
484
|
1199 You can make these words:
|
|
1200 bork
|
|
1201 borkbork
|
|
1202 borkborkbork
|
|
1203 (etc.)
|
481
|
1204 onion
|
|
1205 soup
|
|
1206 onionsoup
|
|
1207
|
714
|
1208 The COMPOUNDRULE item may appear multiple times. The argument is made out of
|
484
|
1209 one or more groups, where each group can be:
|
|
1210 one flag e.g., c
|
|
1211 alternate flags inside [] e.g., [abc]
|
|
1212 Optionally this may be followed by:
|
|
1213 * the group appears zero or more times, e.g., sm*e
|
|
1214 + the group appears one or more times, e.g., c+
|
481
|
1215
|
484
|
1216 This is similar to the regexp pattern syntax (but not the same!). A few
|
|
1217 examples with the sequence of word flags they require:
|
714
|
1218 COMPOUNDRULE x+ x xx xxx etc.
|
|
1219 COMPOUNDRULE yz yz
|
|
1220 COMPOUNDRULE x+z xz xxz xxxz etc.
|
|
1221 COMPOUNDRULE yx+ yx yxx yxxx etc.
|
481
|
1222
|
714
|
1223 COMPOUNDRULE [abc]z az bz cz
|
|
1224 COMPOUNDRULE [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc.
|
|
1225 COMPOUNDRULE a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc.
|
|
1226 COMPOUNDRULE sm*e se sme smme smmme etc.
|
|
1227 COMPOUNDRULE s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc.
|
481
|
1228
|
491
|
1229 A specific example: Allow a compound to be made of two words and a dash:
|
|
1230 In the .aff file:
|
714
|
1231 COMPOUNDRULE sde ~
|
491
|
1232 NEEDAFFIX x ~
|
809
|
1233 COMPOUNDWORDMAX 3 ~
|
491
|
1234 COMPOUNDMIN 1 ~
|
|
1235 In the .dic file:
|
|
1236 start/s ~
|
|
1237 end/e ~
|
|
1238 -/xd ~
|
|
1239
|
|
1240 This allows for the word "start-end", but not "startend".
|
|
1241
|
819
|
1242 An additional implied rule is that, without further flags, a word with a
|
|
1243 prefix cannot be compounded after another word, and a word with a suffix
|
|
1244 cannot be compounded with a following word. Thus the affix cannot appear
|
|
1245 on the inside of a compound word. This can be changed with the
|
|
1246 |spell-COMPOUNDPERMITFLAG|.
|
|
1247
|
625
|
1248 *spell-NEEDCOMPOUND*
|
|
1249 The NEEDCOMPOUND flag is used to require that a word is used as part of a
|
|
1250 compound word. The word itself is not a good word. Example:
|
|
1251
|
|
1252 NEEDCOMPOUND & ~
|
|
1253
|
481
|
1254 *spell-COMPOUNDMIN*
|
500
|
1255 The minimal character length of a word used for compounding is specified with
|
481
|
1256 COMPOUNDMIN. Example:
|
|
1257 COMPOUNDMIN 5 ~
|
|
1258
|
500
|
1259 When omitted there is no minimal length. Obviously you could just leave out
|
|
1260 the compound flag from short words instead, this feature is present for
|
|
1261 compatibility with Myspell.
|
481
|
1262
|
809
|
1263 *spell-COMPOUNDWORDMAX*
|
484
|
1264 The maximum number of words that can be concatenated into a compound word is
|
809
|
1265 specified with COMPOUNDWORDMAX. Example:
|
|
1266 COMPOUNDWORDMAX 3 ~
|
484
|
1267
|
|
1268 When omitted there is no maximum. It applies to all compound words.
|
|
1269
|
|
1270 To set a limit for words with specific flags make sure the items in
|
714
|
1271 COMPOUNDRULE where they appear don't allow too many words.
|
484
|
1272
|
|
1273 *spell-COMPOUNDSYLMAX*
|
|
1274 The maximum number of syllables that a compound word may contain is specified
|
|
1275 with COMPOUNDSYLMAX. Example:
|
|
1276 COMPOUNDSYLMAX 6 ~
|
481
|
1277
|
484
|
1278 This has no effect if there is no SYLLABLE item. Without COMPOUNDSYLMAX there
|
|
1279 is no limit on the number of syllables.
|
|
1280
|
809
|
1281 If both COMPOUNDWORDMAX and COMPOUNDSYLMAX are defined, a compound word is
|
491
|
1282 accepted if it fits one of the criteria, thus is either made from up to
|
809
|
1283 COMPOUNDWORDMAX words or contains up to COMPOUNDSYLMAX syllables.
|
491
|
1284
|
625
|
1285 *spell-COMPOUNDFORBIDFLAG*
|
|
1286 The COMPOUNDFORBIDFLAG specifies a flag that can be used on an affix. It
|
819
|
1287 means that the word plus affix cannot be used in a compound word. Example:
|
|
1288 affix file:
|
|
1289 COMPOUNDFLAG c ~
|
|
1290 COMPOUNDFORBIDFLAG x ~
|
|
1291 SFX a Y 2 ~
|
|
1292 SFX a 0 s . ~
|
|
1293 SFX a 0 ize/x . ~
|
|
1294 dictionary:
|
|
1295 word/c ~
|
|
1296 util/ac ~
|
|
1297
|
|
1298 This allows for "wordutil" and "wordutils" but not "wordutilize".
|
827
|
1299 Note: this doesn't work for postponed prefixes yet.
|
625
|
1300
|
|
1301 *spell-COMPOUNDPERMITFLAG*
|
|
1302 The COMPOUNDPERMITFLAG specifies a flag that can be used on an affix. It
|
|
1303 means that the word plus affix can also be used in a compound word in a way
|
819
|
1304 where the affix ends up halfway the word. Without this flag that is not
|
|
1305 allowed.
|
827
|
1306 Note: this doesn't work for postponed prefixes yet.
|
625
|
1307
|
809
|
1308 *spell-COMPOUNDROOT*
|
|
1309 The COMPOUNDROOT flag is used for words in the dictionary that are already a
|
|
1310 compound. This means it counts for two words when checking the compounding
|
|
1311 rules. Can also be used for an affix to count the affix as a compounding
|
|
1312 word.
|
|
1313
|
484
|
1314 *spell-SYLLABLE*
|
|
1315 The SYLLABLE item defines characters or character sequences that are used to
|
|
1316 count the number of syllables in a word. Example:
|
|
1317 SYLLABLE aáeéiíoóöõuúüûy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~
|
|
1318
|
|
1319 Before the first slash is the set of characters that are counted for one
|
|
1320 syllable, also when repeated and mixed, until the next character that is not
|
|
1321 in this set. After the slash come sequences of characters that are counted
|
|
1322 for one syllable. These are preferred over using characters from the set.
|
|
1323 With the example "ideeen" has three syllables, counted by "i", "ee" and "e".
|
|
1324
|
|
1325 Only case-folded letters need to be included.
|
|
1326
|
819
|
1327 Above another way to restrict compounding was mentioned above: Adding the
|
|
1328 |spell-COMPOUNDFORBIDFLAG| flag to an affix causes all words that are made
|
|
1329 with that affix not be be used for compounding.
|
481
|
1330
|
493
|
1331
|
|
1332 UNLIMITED COMPOUNDING *spell-NOBREAK*
|
|
1333
|
|
1334 For some languages, such as Thai, there is no space in between words. This
|
|
1335 looks like all words are compounded. To specify this use the NOBREAK item in
|
|
1336 the affix file, without arguments:
|
|
1337 NOBREAK ~
|
|
1338
|
|
1339 Vim will try to figure out where one word ends and a next starts. When there
|
|
1340 are spelling mistakes this may not be quite right.
|
|
1341
|
481
|
1342
|
625
|
1343 *spell-COMMON*
|
|
1344 Common words can be specified with the COMMON item. This will give better
|
|
1345 suggestions when editing a short file. Example:
|
|
1346
|
|
1347 COMMON the of to and a in is it you that he was for on are ~
|
|
1348
|
|
1349 The words must be separated by white space, up to 25 per line.
|
|
1350 When multiple regions are specified in a ":mkspell" command the common words
|
|
1351 for all regions are combined and used for all regions.
|
|
1352
|
|
1353 *spell-NOSPLITSUGS*
|
699
|
1354 This item indicates that splitting a word to make suggestions is not a good
|
|
1355 idea. Split-word suggestions will appear only when there are few similar
|
|
1356 words.
|
625
|
1357
|
|
1358 NOSPLITSUGS ~
|
|
1359
|
|
1360 *spell-NOSUGGEST*
|
|
1361 The flag specified with NOSUGGEST can be used for words that will not be
|
|
1362 suggested. Can be used for obscene words.
|
|
1363
|
|
1364 NOSUGGEST % ~
|
|
1365
|
|
1366
|
493
|
1367 REPLACEMENTS *spell-REP*
|
323
|
1368
|
|
1369 In the affix file REP items can be used to define common mistakes. This is
|
|
1370 used to make spelling suggestions. The items define the "from" text and the
|
|
1371 "to" replacement. Example:
|
|
1372
|
|
1373 REP 4 ~
|
|
1374 REP f ph ~
|
|
1375 REP ph f ~
|
|
1376 REP k ch ~
|
|
1377 REP ch k ~
|
|
1378
|
497
|
1379 The first line specifies the number of REP lines following. Vim ignores the
|
625
|
1380 number, but it must be there (for compatibility with Myspell).
|
497
|
1381
|
378
|
1382 Don't include simple one-character replacements or swaps. Vim will try these
|
|
1383 anyway. You can include whole words if you want to, but you might want to use
|
|
1384 the "file:" item in 'spellsuggest' instead.
|
323
|
1385
|
532
|
1386 You can include a space by using an underscore:
|
|
1387
|
|
1388 REP the_the the ~
|
|
1389
|
323
|
1390
|
626
|
1391 SIMILAR CHARACTERS *spell-MAP* *E783*
|
323
|
1392
|
378
|
1393 In the affix file MAP items can be used to define letters that are very much
|
323
|
1394 alike. This is mostly used for a letter with different accents. This is used
|
|
1395 to prefer suggestions with these letters substituted. Example:
|
|
1396
|
|
1397 MAP 2 ~
|
|
1398 MAP eéëêè ~
|
|
1399 MAP uüùúû ~
|
|
1400
|
497
|
1401 The first line specifies the number of MAP lines following. Vim ignores the
|
|
1402 number, but the line must be there.
|
323
|
1403
|
378
|
1404 Each letter must appear in only one of the MAP items. It's a bit more
|
|
1405 efficient if the first letter is ASCII or at least one without accents.
|
336
|
1406
|
323
|
1407
|
625
|
1408 .SUG FILE *spell-NOSUGFILE*
|
|
1409
|
|
1410 When soundfolding is specified in the affix file then ":mkspell" will normally
|
644
|
1411 produce a .sug file next to the .spl file. This file is used to find
|
|
1412 suggestions by their sound-a-like form quickly. At the cost of a lot of
|
|
1413 memory (the amount depends on the number of words, |:mkspell| will display an
|
|
1414 estimate when it's done).
|
625
|
1415
|
|
1416 To avoid producing a .sug file use this item in the affix file:
|
|
1417
|
|
1418 NOSUGFILE ~
|
|
1419
|
644
|
1420 Users can simply omit the .sug file if they don't want to use it.
|
|
1421
|
625
|
1422
|
493
|
1423 SOUND-A-LIKE *spell-SAL*
|
323
|
1424
|
|
1425 In the affix file SAL items can be used to define the sounds-a-like mechanism
|
|
1426 to be used. The main items define the "from" text and the "to" replacement.
|
378
|
1427 Simplistic example:
|
323
|
1428
|
|
1429 SAL CIA X ~
|
|
1430 SAL CH X ~
|
|
1431 SAL C K ~
|
|
1432 SAL K K ~
|
|
1433
|
388
|
1434 There are a few rules and this can become quite complicated. An explanation
|
378
|
1435 how it works can be found in the Aspell manual:
|
375
|
1436 http://aspell.net/man-html/Phonetic-Code.html.
|
323
|
1437
|
|
1438 There are a few special items:
|
|
1439
|
|
1440 SAL followup true ~
|
|
1441 SAL collapse_result true ~
|
|
1442 SAL remove_accents true ~
|
|
1443
|
|
1444 "1" has the same meaning as "true". Any other value means "false".
|
|
1445
|
375
|
1446
|
493
|
1447 SIMPLE SOUNDFOLDING *spell-SOFOFROM* *spell-SOFOTO*
|
375
|
1448
|
|
1449 The SAL mechanism is complex and slow. A simpler mechanism is mapping all
|
|
1450 characters to another character, mapping similar sounding characters to the
|
|
1451 same character. At the same time this does case folding. You can not have
|
378
|
1452 both SAL items and simple soundfolding.
|
375
|
1453
|
388
|
1454 There are two items required: one to specify the characters that are mapped
|
375
|
1455 and one that specifies the characters they are mapped to. They must have
|
|
1456 exactly the same number of characters. Example:
|
|
1457
|
|
1458 SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ~
|
|
1459 SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkes ~
|
|
1460
|
|
1461 In the example all vowels are mapped to the same character 'e'. Another
|
378
|
1462 method would be to leave out all vowels. Some characters that sound nearly
|
|
1463 the same and are often mixed up, such as 'm' and 'n', are mapped to the same
|
|
1464 character. Don't do this too much, all words will start looking alike.
|
375
|
1465
|
|
1466 Characters that do not appear in SOFOFROM will be left out, except that all
|
|
1467 white space is replaced by one space. Sequences of the same character in
|
|
1468 SOFOFROM are replaced by one.
|
|
1469
|
|
1470 You can use the |soundfold()| function to try out the results. Or set the
|
587
|
1471 'verbose' option to see the score in the output of the |z=| command.
|
375
|
1472
|
|
1473
|
625
|
1474 UNSUPPORTED ITEMS *spell-affix-not-supported*
|
|
1475
|
|
1476 These items appear in the affix file of other spell checkers. In Vim they are
|
|
1477 ignored, not supported or defined in another way.
|
|
1478
|
|
1479 ACCENT (Hunspell) *spell-ACCENT*
|
|
1480 Use MAP instead. |spell-MAP|
|
|
1481
|
|
1482 CHECKCOMPOUNDCASE (Hunspell) *spell-CHECKCOMPOUNDCASE*
|
|
1483 Disallow uppercase letters at compound word boundaries.
|
|
1484 Not supported.
|
|
1485
|
|
1486 CHECKCOMPOUNDDUP (Hunspell) *spell-CHECKCOMPOUNDDUP*
|
|
1487 Disallow using the same word twice in a compound. Not
|
|
1488 supported.
|
|
1489
|
|
1490 CHECKCOMPOUNDREP (Hunspell) *spell-CHECKCOMPOUNDREP*
|
|
1491 Something about using REP items and compound words. Not
|
|
1492 supported.
|
|
1493
|
|
1494 CHECKCOMPOUNDTRIPLE (Hunspell) *spell-CHECKCOMPOUNDTRIPLE*
|
|
1495 Forbid three identical characters when compounding. Not
|
|
1496 supported.
|
|
1497
|
|
1498 CHECKCOMPOUNDPATTERN (Hunspell) *spell-CHECKCOMPOUNDPATTERN*
|
|
1499 Forbid compounding when patterns match. Not supported.
|
|
1500
|
|
1501 COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
|
|
1502 Enables using two prefixes. Not supported.
|
|
1503
|
714
|
1504 COMPOUND (Hunspell) *spell-COMPOUND*
|
|
1505 This is one line with the count of COMPOUND items, followd by
|
|
1506 that many COMPOUND lines with a pattern.
|
|
1507 Remove the first line with the count and rename the other
|
|
1508 items to COMPOUNDRULE |spell-COMPOUNDRULE|
|
|
1509
|
809
|
1510 COMPOUNDFIRST (Hunspell) *spell-COMPOUNDFIRST*
|
|
1511 Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
|
|
1512
|
625
|
1513 COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
|
714
|
1514 Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
|
625
|
1515
|
|
1516 COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
|
714
|
1517 Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
|
625
|
1518
|
|
1519 COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
|
714
|
1520 Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
|
625
|
1521
|
|
1522 COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE*
|
|
1523 Use SYLLABLE and COMPOUNDSYLMAX instead. |spell-SYLLABLE|
|
|
1524 |spell-COMPOUNDSYLMAX|
|
|
1525
|
|
1526 FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD*
|
|
1527 Use BAD instead. |spell-BAD|
|
|
1528
|
|
1529 LANG (Hunspell) *spell-LANG*
|
|
1530 This specifies language-specific behavior. This actually
|
|
1531 moves part of the language knowledge into the program,
|
|
1532 therefore Vim does not support it. Each language property
|
|
1533 must be specified separately.
|
|
1534
|
|
1535 LEMMA_PRESENT (Hunspell) *spell-LEMMA_PRESENT*
|
809
|
1536 Only needed for morphological analysis.
|
625
|
1537
|
|
1538 MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS*
|
|
1539 Not supported.
|
|
1540
|
|
1541 ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND*
|
|
1542 Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND|
|
|
1543
|
|
1544 PSEUDOROOT (Hunspell) *spell-PSEUDOROOT*
|
|
1545 Use NEEDAFFIX instead. |spell-NEEDAFFIX|
|
|
1546
|
|
1547 SUGSWITHDOTS (Hunspell) *spell-SUGSWITHDOTS*
|
|
1548 Adds dots to suggestions. Vim doesn't need this.
|
|
1549
|
|
1550 SYLLABLENUM (Hunspell) *spell-SYLLABLENUM*
|
|
1551 Not supported.
|
|
1552
|
|
1553 TRY (Myspell, Hunspell, others) *spell-TRY*
|
|
1554 Vim does not use the TRY item, it is ignored. For making
|
724
|
1555 suggestions the actual characters in the words are used, that
|
|
1556 is much more efficient.
|
625
|
1557
|
|
1558 WORDCHARS (Hunspell) *spell-WORDCHARS*
|
|
1559 Used to recognize words. Vim doesn't need it, because there
|
|
1560 is no need to separate words before checking them (using a
|
|
1561 trie instead of a hashtable).
|
|
1562
|
221
|
1563 vim:tw=78:sw=4:ts=8:ft=help:norl:
|