*spell.txt*	For Vim version 7.0aa.  Last change: 2005 Jul 04


		  VIM REFERENCE MANUAL	  by Bram Moolenaar


Spell checking						*spell*

1. Quick start			|spell-quickstart|
2. Remarks on spell checking	|spell-remarks|
3. Generating a spell file	|spell-mkspell|
4. Spell file format		|spell-file-format|

{Vi does not have any of these commands}

Spell checking is not available when the |+syntax| feature has been disabled
at compile time.

==============================================================================
1. Quick start						*spell-quickstart*

This command switches on spell checking: >

	:setlocal spell spelllang=en_us

This switches on the 'spell' option and specifies to check for US English.

The words that are not recognized are highlighted with one of these:
	SpellBad	word not recognized			|hl-SpellBad|
	SpellCap	word not capitalised			|hl-SpellCap|
	SpellRare	rare word				|hl-SpellRare|
	SpellLocal	wrong spelling for selected region	|hl-SpellLocal|

Vim only checks words for spelling, there is no grammar check.

To search for the next misspelled word:

							*]s* *E756*
]s			Move to next misspelled word after the cursor.
			A count before the command can be used to repeat.

							*[s*
[s			Like "]s" but search backwards, find the misspelled
			word before the cursor.  Doesn't recognize words
			split over two lines, thus may stop at words that are
			not highlighted as bad.  Does not stop at word with
			missing capital at the start of a line.

							*]S*
]S			Like "]s" but only stop at bad words, not at rare
			words or words for another region.

							*[S*
[S			Like "]S" but search backwards.


To add words to your own word list:				*E764*

							*zg*
zg			Add word under the cursor as a good word to the first
			name in 'spellfile'.  In Visual mode the selected
			characters are added as a word (including white
			space!).  If the word is explicitly marked as bad word
			in another spell file the result is unpredictable.
			A count may precede the command to indicate the entry
			in 'spellfile' to be used.  A count of two uses the
			second entry.

							*zG*
zG			Like "zg" but add the word to the internal word list
			|internal-wordlist|.

							*zw*
zw			Like "zg" but mark the word as a wrong (bad) word.

							*zW*
zW			Like "zw" but add the word to the internal word list
			|internal-wordlist|.

							*:spe* *:spellgood*
:[count]spe[llgood] {word}
			Add [word} as a good word to 'spellfile', like with
			"zg".  Without count the first name is used, with a
			count of two the second entry, etc.

:spe[llgood]! {word}	Add [word} as a good word to the internal word list,
			like with "zG".

							*:spellw* *:spellwrong*
:[count]spellw[rong] {word}
			Add [word} as a wrong (bad) word to 'spellfile', as
			with "zw".  Without count the first name is used, with
			a count of two the second entry, etc.

:spellw[rong]! {word}	Add [word} as a wrong (bad) word to the internal word
			list.

After adding a word to 'spellfile' with the above commands its associated
".spl" file will automatically be updated and reloaded.  If you change
'spellfile' manually you need to use the |:mkspell| command.  This sequence of
commands mostly works well: >
	:edit <file in 'spellfile'>
<	(make changes to the spell file) >
	:mkspell! %

More details about the 'spellfile' format below |spell-wordlist-format|.

							*internal-wordlist*
The internal word list is used for all buffers where 'spell' is set.  It is
not stored, it is lost when you exit Vim.  It is also cleared when 'encoding'
is set.


Finding suggestions for bad words:
							*z?*
z?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                