comparison runtime/doc/spell.txt @ 386:607d3cd9364f

updated for version 7.0100
author vimboss
date Sat, 02 Jul 2005 23:19:16 +0000
parents 8c229eb52e34
children f92bb1845823
comparison
equal deleted inserted replaced
385:bd4c7ce1da02 386:607d3cd9364f
1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Jul 01 1 *spell.txt* For Vim version 7.0aa. Last change: 2005 Jul 02
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
25 25
26 This switches on the 'spell' option and specifies to check for US English. 26 This switches on the 'spell' option and specifies to check for US English.
27 27
28 The words that are not recognized are highlighted with one of these: 28 The words that are not recognized are highlighted with one of these:
29 SpellBad word not recognized |hl-SpellBad| 29 SpellBad word not recognized |hl-SpellBad|
30 SpellCap word not capatilized |hl-SpellCap|
30 SpellRare rare word |hl-SpellRare| 31 SpellRare rare word |hl-SpellRare|
31 SpellLocal wrong spelling for selected region |hl-SpellLocal| 32 SpellLocal wrong spelling for selected region |hl-SpellLocal|
32 33
33 Vim only checks words for spelling, there is no grammar check. 34 Vim only checks words for spelling, there is no grammar check.
34 35
40 41
41 *[s* 42 *[s*
42 [s Like "]s" but search backwards, find the misspelled 43 [s Like "]s" but search backwards, find the misspelled
43 word before the cursor. Doesn't recognize words 44 word before the cursor. Doesn't recognize words
44 split over two lines, thus may stop at words that are 45 split over two lines, thus may stop at words that are
45 not highlighted as bad. 46 not highlighted as bad. Does not stop at word with
47 missing capital at the start of a line.
46 48
47 *]S* 49 *]S*
48 ]S Like "]s" but only stop at bad words, not at rare 50 ]S Like "]s" but only stop at bad words, not at rare
49 words or words for another region. 51 words or words for another region.
50 52
53 55
54 56
55 To add words to your own word list: *E764* 57 To add words to your own word list: *E764*
56 58
57 *zg* 59 *zg*
58 zg Add word under the cursor as a good word to 60 zg Add word under the cursor as a good word to the first
59 'spellfile'. In Visual mode the selected characters 61 name in 'spellfile'. In Visual mode the selected
60 are added as a word (including white space!). 62 characters are added as a word (including white
63 space!). If the word is explicitly marked as bad word
64 in another spell file the result is unpredictable.
65 A count may precede the command to indicate the entry
66 in 'spellfile' to be used. A count of two uses the
67 second entry.
61 68
62 *zG* 69 *zG*
63 zG Like "zg" but add the word to the internal word list. 70 zG Like "zg" but add the word to the internal word list
71 |internal-wordlist|.
64 72
65 *zw* 73 *zw*
66 zw Add word under the cursor as a wrong (bad) word to 74 zw Like "zg" but mark the word as a wrong (bad) word.
67 'spellfile'. In Visual mode the selected characters
68 are added as a word (including white space!).
69 75
70 *zW* 76 *zW*
71 zW Like "zw" but add the word to the internal word list. 77 zW Like "zw" but add the word to the internal word list
78 |internal-wordlist|.
72 79
73 *:spe* *:spellgood* 80 *:spe* *:spellgood*
74 :spe[llgood] {word} Add [word} as a good word to 'spellfile'. 81 :[count]spe[llgood] {word}
75 82 Add [word} as a good word to 'spellfile', like with
76 :spe[llgood]! {word} Add [word} as a good word to the internal word list. 83 "zg". Without count the first name is used, with a
84 count of two the second entry, etc.
85
86 :spe[llgood]! {word} Add [word} as a good word to the internal word list,
87 like with "zG".
77 88
78 *:spellw* *:spellwrong* 89 *:spellw* *:spellwrong*
79 :spellw[rong] {word} Add [word} as a wrong (bad) word to 'spellfile'. 90 :[count]spellw[rong] {word}
91 Add [word} as a wrong (bad) word to 'spellfile', as
92 with "zw". Without count the first name is used, with
93 a count of two the second entry, etc.
80 94
81 :spellw[rong]! {word} Add [word} as a wrong (bad) word to the internal word 95 :spellw[rong]! {word} Add [word} as a wrong (bad) word to the internal word
82 list. 96 list.
83 97
84 After adding a word to 'spellfile' with the above commands its associated 98 After adding a word to 'spellfile' with the above commands its associated
85 ".spl" file will automatically be updated and reloaded. If you change 99 ".spl" file will automatically be updated and reloaded. If you change
86 'spellfile' manually you need to use the |:mkspell| command. This sequence of 100 'spellfile' manually you need to use the |:mkspell| command. This sequence of
87 commands mostly works well: > 101 commands mostly works well: >
88 :exe 'e ' . &spellfile 102 :edit <file in 'spellfile'>
89 < (make changes to the spell file) > 103 < (make changes to the spell file) >
90 :mkspell! % 104 :mkspell! %
91 105
92 More details about the 'spellfile' format below |spell-wordlist-format|. 106 More details about the 'spellfile' format below |spell-wordlist-format|.
93 107
108 *internal-wordlist*
94 The internal word list is used for all buffers where 'spell' is set. It is 109 The internal word list is used for all buffers where 'spell' is set. It is
95 not stored, it is lost when you exit Vim. It is also cleared when 'encoding' 110 not stored, it is lost when you exit Vim. It is also cleared when 'encoding'
96 is set. 111 is set.
97 112
98 113
126 with the replaced word in the current window. 141 with the replaced word in the current window.
127 142
128 The 'spellsuggest' option influences how the list of suggestions is generated 143 The 'spellsuggest' option influences how the list of suggestions is generated
129 and sorted. See |'spellsuggest'|. 144 and sorted. See |'spellsuggest'|.
130 145
146 The 'spellcapcheck' option is used to check the first word of a sentence
147 starts with a capital. This doesn't work for the first word in the file.
148 When there is a line break right after a sentence the highlighting of the next
149 line may be postponed. Use |CTRL-L| when needed.
150
131 ============================================================================== 151 ==============================================================================
132 2. Remarks on spell checking *spell-remarks* 152 2. Remarks on spell checking *spell-remarks*
133 153
134 PERFORMANCE 154 PERFORMANCE
135 155
180 200
181 Only the first file is loaded, the one that is first in 'runtimepath'. If 201 Only the first file is loaded, the one that is first in 'runtimepath'. If
182 this succeeds then additionally files with the name LL.EEE.add.spl are loaded. 202 this succeeds then additionally files with the name LL.EEE.add.spl are loaded.
183 All the ones that are found are used. 203 All the ones that are found are used.
184 204
185 Additionally, the file related to 'spellfile' is loaded. This is the file 205 Additionally, the files related to the names in 'spellfile' are loaded. These
186 that |zg| and |zw| add good and wrong words to. 206 are the files that |zg| and |zw| add good and wrong words to.
187 207
188 Exceptions: 208 Exceptions:
189 - Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign doesn't 209 - Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign doesn't
190 matter for spelling. 210 matter for spelling.
191 - When no spell file for 'encoding' is found "ascii" is tried. This only 211 - When no spell file for 'encoding' is found "ascii" is tried. This only