Home Explore Blog CI



neovim

3rd chunk of `runtime/doc/spell.txt`
1378d208ec431884c8cf72db84cb45bf0eeb4f210f2e416a0000000100000fa0
 if you don't want to
			replace.  You can also use the mouse to click on your
			choice (only works if the mouse can be used in Normal
			mode and when there are no line wraps).  Click on the
			first line (the header) to cancel.

			The suggestions listed normally replace a highlighted
			bad word.  Sometimes they include other text, in that
			case the replaced text is also listed after a "<".

			If a count is used that suggestion is used, without
			prompting.  For example, "1z=" always takes the first
			suggestion.

			If 'verbose' is non-zero a score will be displayed
			with the suggestions to indicate the likeliness to the
			badly spelled word (the higher the score the more
			different).
			When a word was replaced the redo command "." will
			repeat the word replacement.  This works like "ciw",
			the good word and <Esc>.  This does NOT work for Thai
			and other languages without spaces between words.

					*:spellr* *:spellrepall* *E752* *E753*
:spellr[epall]		Repeat the replacement done by |z=| for all matches
			with the replaced word in the current window.

In Insert mode, when the cursor is after a badly spelled word, you can use
CTRL-X s to find suggestions.  This works like Insert mode completion.  Use
CTRL-N to use the next suggestion, CTRL-P to go back. |i_CTRL-X_s|

The 'spellsuggest' option influences how the list of suggestions is generated
and sorted.  See |'spellsuggest'|.

The 'spellcapcheck' option is used to check the first word of a sentence
starts with a capital.  This doesn't work for the first word in the file.
When there is a line break right after a sentence the highlighting of the next
line may be postponed.  Use |CTRL-L| when needed.  Also see |set-spc-auto| for
how it can be set automatically when 'spelllang' is set.

The 'spelloptions' option has a few more flags that influence the way spell
checking works.  For example, "camel" splits CamelCased words so that each
part of the word is spell-checked separately.

Vim counts the number of times a good word is encountered.  This is used to
sort the suggestions: words that have been seen before get a small bonus,
words that have been seen often get a bigger bonus.  The COMMON item in the
affix file can be used to define common words, so that this mechanism also
works in a new or short file |spell-COMMON|.

==============================================================================
2. Remarks on spell checking				*spell-remarks*

PERFORMANCE

Vim does on-the-fly spell checking.  To make this work fast the word list is
loaded in memory.  Thus this uses a lot of memory (1 Mbyte or more).  There
might also be a noticeable delay when the word list is loaded, which happens
when 'spell' is set and when 'spelllang' is set while 'spell' was already set.
To minimize the delay each word list is only loaded once, it is not deleted
when 'spelllang' is made empty or 'spell' is reset.  When 'encoding' is set
all the word lists are reloaded, thus you may notice a delay then too.


REGIONS

A word may be spelled differently in various regions.  For example, English
comes in (at least) these variants:

	en		all regions
	en_au		Australia
	en_ca		Canada
	en_gb		Great Britain
	en_nz		New Zealand
	en_us		USA

Words that are not used in one region but are used in another region are
highlighted with SpellLocal |hl-SpellLocal|.

Always use lowercase letters for the language and region names.

When adding a word with |zg| or another command it's always added for all
regions.  You can change that by manually editing the 'spellfile'.  See
|spell-wordlist-format|.  Note that the regions as specified in the files in
'spellfile' are only used when all entries in 'spelllang' specify the same
region (not counting files specified by their .spl name).

							*spell-german*
Specific exception: For German these special regions are used:
	de		all German words accepted
	de_de		old and new spelling
	de_19		old spelling
	de_20		new spelling
	de_at		Austria
	de_ch		Switzerland


Title: Vim Spell Checking: Refining Suggestions, Regional Variations, and Performance
Summary
This section elaborates on refining spell-checking suggestions in Vim using `CTRL-X s` in Insert mode and the `'spellsuggest'` option. It covers options like `'spellcapcheck'` and `'spelloptions'` that influence spell-checking behavior. It also explains how Vim counts word occurrences to improve suggestion sorting. Further, it discusses the importance of considering regional spelling variations and provides details on spell-checking performance, memory usage, and handling different German spelling regions.