comparison runtime/doc/spell.txt @ 353:3161473d6462

updated for version 7.0091
author vimboss
date Thu, 23 Jun 2005 22:36:45 +0000
parents 7e819e81117e
children 6c62b9b939bd
comparison
equal deleted inserted replaced
352:e5f0dd64a9c6 353:3161473d6462
1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 22 1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 23
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
102 PERFORMANCE 102 PERFORMANCE
103 103
104 Note that Vim does on-the-fly spell checking. To make this work fast the 104 Note that Vim does on-the-fly spell checking. To make this work fast the
105 word list is loaded in memory. Thus this uses a lot of memory (1 Mbyte or 105 word list is loaded in memory. Thus this uses a lot of memory (1 Mbyte or
106 more). There might also be a noticeable delay when the word list is loaded, 106 more). There might also be a noticeable delay when the word list is loaded,
107 which happens when 'spelllang' or 'spell' is set. Each word list is only 107 which happens when 'spell' is set and when 'spelllang' is set while 'spell'
108 loaded once, they are not deleted when 'spelllang' is made empty or 'spell' is 108 was already set. Each word list is only loaded once, they are not deleted
109 reset. When 'encoding' is set the word lists are reloaded, thus you may 109 when 'spelllang' is made empty or 'spell' is reset. When 'encoding' is set
110 notice a delay then too. 110 all the word lists are reloaded, thus you may notice a delay then too.
111 111
112 112
113 REGIONS 113 REGIONS
114 114
115 A word may be spelled differently in various regions. For example, English 115 A word may be spelled differently in various regions. For example, English
130 When adding a word with |zg| or another command it's always added for all 130 When adding a word with |zg| or another command it's always added for all
131 regions. You can change that by manually editing the 'spellfile'. See 131 regions. You can change that by manually editing the 'spellfile'. See
132 |spell-wordlist-format|. 132 |spell-wordlist-format|.
133 133
134 134
135 SPELL FILES 135 SPELL FILES *spell-load*
136 136
137 Vim searches for spell files in the "spell" subdirectory of the directories in 137 Vim searches for spell files in the "spell" subdirectory of the directories in
138 'runtimepath'. The name is: LL.EEE.spl, where: 138 'runtimepath'. The name is: LL.EEE.spl, where:
139 LL the language name 139 LL the language name
140 EEE the value of 'encoding' 140 EEE the value of 'encoding'
141 141
142 The value for "LL" comes from 'spelllang', but excludes the region name.
143 Examples:
144 'spelllang' LL ~
145 en_us en
146 en-rare en-rare
147 medical_ca medical
148
142 Only the first file is loaded, the one that is first in 'runtimepath'. If 149 Only the first file is loaded, the one that is first in 'runtimepath'. If
143 this succeeds then additionally files with the name LL.EEE.add.spl are loaded. 150 this succeeds then additionally files with the name LL.EEE.add.spl are loaded.
144 All the ones that are found are used. 151 All the ones that are found are used.
152
153 Additionally, the file related to 'spellfile' is loaded. This is the file
154 that |zg| and |zw| add good and wrong words to.
145 155
146 Exceptions: 156 Exceptions:
147 - Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign doesn't 157 - Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign doesn't
148 matter for spelling. 158 matter for spelling.
149 - When no spell file for 'encoding' is found "ascii" is tried. This only 159 - When no spell file for 'encoding' is found "ascii" is tried. This only
259 depends on what you find. 269 depends on what you find.
260 270
261 Make sure your current locale is set properly, otherwise Vim doesn't know what 271 Make sure your current locale is set properly, otherwise Vim doesn't know what
262 characters are upper/lower case letters. If the locale isn't available (e.g., 272 characters are upper/lower case letters. If the locale isn't available (e.g.,
263 when using an MS-Windows codepage on Unix) add tables to the .aff file 273 when using an MS-Windows codepage on Unix) add tables to the .aff file
264 |spell-affix-chars|. 274 |spell-affix-chars|. If the .aff file doesn't define a table then the word
265 275 table of the currently active spelling is used. If spelling is not active
266 :mksp[ell][!] [-ascii] {outname} {inname} ... *:mksp* *:mkspell* 276 then Vim will try to guess.
277
278 *:mksp* *:mkspell*
279 :mksp[ell][!] [-ascii] {outname} {inname} ...
267 Generate a Vim spell file word lists. Example: > 280 Generate a Vim spell file word lists. Example: >
268 :mkspell nl nl_NL.words 281 :mkspell nl nl_NL.words
269 < 282 < *E751*
270 When {outname} ends in ".spl" it is used as the output 283 When {outname} ends in ".spl" it is used as the output
271 file name. Otherwise it should be a language name, 284 file name. Otherwise it should be a language name,
272 such as "en". The file written will be 285 such as "en", without the region name. The file
273 {outname}.{encoding}.spl. {encoding} is the value of 286 written will be "{outname}.{encoding}.spl", where
274 the 'encoding' option. 287 {encoding} is the value of the 'encoding' option.
275 288
276 When the output file already exists [!] must be added 289 When the output file already exists [!] must be added
277 to overwrite it. 290 to overwrite it.
278 291
279 When the [-ascii] argument is present, words with 292 When the [-ascii] argument is present, words with
325 vimdiff xx_YY.orig.dic xx_YY.new.dic 338 vimdiff xx_YY.orig.dic xx_YY.new.dic
326 3. Take over the changes you like in xx_YY.dic. 339 3. Take over the changes you like in xx_YY.dic.
327 You may also need to change xx_YY.aff. 340 You may also need to change xx_YY.aff.
328 4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff. 341 4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff.
329 342
343
344 SPELL FILE DUMP
345
346 If for some reason you want to check what words are supported by the currently
347 used spelling files, use this command:
348
349 *:spelldump* *:spelld*
350 :spelld[ump] Open a new window and fill it with all currently valid
351 words.
352 Note: For some languages the result may be huge and
353 Vim may run out of memory.
354
355 The format of the word list is used |spell-wordlist-format|. You should be
356 able to read it with ":mkspell" to generate one .spl file that includes all
357 the words.
358
359 Only words for the current region are included. No "/regions" line is
360 generated.
361
362 Comment lines are used to indicate which .spl file the words came from.
363
330 ============================================================================== 364 ==============================================================================
331 9. Spell file format *spell-file-format* 365 3. Spell file format *spell-file-format*
332 366
333 This is the format of the files that are used by the person who creates and 367 This is the format of the files that are used by the person who creates and
334 maintains a word list. 368 maintains a word list.
335 369
336 Note that we avoid the word "dictionary" here. That is because the goal of 370 Note that we avoid the word "dictionary" here. That is because the goal of
503 537
504 ASCII characters should be omitted, Vim always handles these in the same way. 538 ASCII characters should be omitted, Vim always handles these in the same way.
505 When the encoding is UTF-8 no word characters need to be specified. 539 When the encoding is UTF-8 no word characters need to be specified.
506 540
507 *E763* 541 *E763*
508 All spell files for the same encoding must use the same word characters, 542 Vim allows you to use spell checking for several languages in the same file.
509 otherwise they can't be combined without errors. The XX.ascii.spl spell file 543 You can list them in the 'spelllang' option. As a consequence all spell files
510 generated with the "-ascii" argument will not contain the table with 544 for the same encoding must use the same word characters, otherwise they can't
511 characters, so that it can be combine with spell files for any encoding. 545 be combined without errors. If you get a warning that the word tables differ
546 you may need to generate the .spl file again with |:mkspell|. Check the FOL,
547 LOW and UPP lines in the used .aff file.
548
549 The XX.ascii.spl spell file generated with the "-ascii" argument will not
550 contain the table with characters, so that it can be combine with spell files
551 for any encoding. The .add.spl files also do not contain the table.
512 552
513 553
514 AFFIXES 554 AFFIXES
515 *spell-affix-PFX* *spell-affix-SFX* 555 *spell-affix-PFX* *spell-affix-SFX*
516 The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell 556 The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell