annotate runtime/doc/spell.txt @ 20836:2616c5a337e0 v8.2.0970

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