Home Explore Blog CI



neovim

19th chunk of `runtime/doc/spell.txt`
4492f77f1bdaa2f1200edba408351a8976e7b26b1d68b9e80000000100000fb8
	CHECKCOMPOUNDPATTERN o e ~

This forbids compounding if the first word ends in "o" and the second word
starts with "e".

The arguments must be plain text, no patterns are actually supported, despite
the item name.  Case is always ignored.

The Hunspell feature to use three arguments and flags is not supported.

							*spell-NOCOMPOUNDSUGS*
This item indicates that using compounding to make suggestions is not a good
idea.  Use this when compounding is used with very short or one-character
words.  E.g. to make numbers out of digits.  Without this flag creating
suggestions would spend most time trying all kind of weird compound words.

	NOCOMPOUNDSUGS ~

							*spell-SYLLABLE*
The SYLLABLE item defines characters or character sequences that are used to
count the number of syllables in a word.  Example:
	SYLLABLE aáeéiíoóöõuúüûy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~

Before the first slash is the set of characters that are counted for one
syllable, also when repeated and mixed, until the next character that is not
in this set.  After the slash come sequences of characters that are counted
for one syllable.  These are preferred over using characters from the set.
With the example "ideeen" has three syllables, counted by "i", "ee" and "e".

Only case-folded letters need to be included.

Another way to restrict compounding was mentioned above: Adding the
|spell-COMPOUNDFORBIDFLAG| flag to an affix causes all words that are made
with that affix to not be used for compounding.


UNLIMITED COMPOUNDING					*spell-NOBREAK*

For some languages, such as Thai, there is no space in between words.  This
looks like all words are compounded.  To specify this use the NOBREAK item in
the affix file, without arguments:
	NOBREAK ~

Vim will try to figure out where one word ends and a next starts.  When there
are spelling mistakes this may not be quite right.


							*spell-COMMON*
Common words can be specified with the COMMON item.  This will give better
suggestions when editing a short file.  Example:

	COMMON  the of to and a in is it you that he she was for on are ~

The words must be separated by white space, up to 25 per line.
When multiple regions are specified in a ":mkspell" command the common words
for all regions are combined and used for all regions.

							*spell-NOSPLITSUGS*
This item indicates that splitting a word to make suggestions is not a good
idea.  Split-word suggestions will appear only when there are few similar
words.

	NOSPLITSUGS ~

							*spell-NOSUGGEST*
The flag specified with NOSUGGEST can be used for words that will not be
suggested.  Can be used for obscene words.

	NOSUGGEST % ~


REPLACEMENTS						*spell-REP*

In the affix file REP items can be used to define common mistakes.  This is
used to make spelling suggestions.  The items define the "from" text and the
"to" replacement.  Example:

	REP 4 ~
	REP f ph ~
	REP ph f ~
	REP k ch ~
	REP ch k ~

The first line specifies the number of REP lines following.  Vim ignores the
number, but it must be there (for compatibility with Myspell).

Don't include simple one-character replacements or swaps.  Vim will try these
anyway.  You can include whole words if you want to, but you might want to use
the "file:" item in 'spellsuggest' instead.

You can include a space by using an underscore:

	REP the_the the ~


SIMILAR CHARACTERS					*spell-MAP* *E783*

In the affix file MAP items can be used to define letters that are very much
alike.  This is mostly used for a letter with different accents.  This is used
to prefer suggestions with these letters substituted.  Example:

	MAP 2 ~
	MAP eéëêè ~
	MAP uüùúû ~

The first line specifies the number of MAP lines following.  Vim ignores the
number, but the line must be there.

Each letter must appear in only one of the MAP items.  It's a bit more
efficient if the first letter is ASCII or at least one without accents.


.SUG FILE						*spell-NOSUGFILE*

When soundfolding is specified in the affix file then ":mkspell" will normally
produce

Title: Advanced Spelling Configuration: Compounding, Syllables, Suggestions, and Replacements
Summary
This section details further spell-checking configurations, including forbidding compounding based on patterns, disabling compound suggestions for specific cases (like number generation), defining syllable structures, and using the COMPOUNDFORBIDFLAG. It explains unlimited compounding with NOBREAK, common word specification with COMMON, disabling split-word suggestions with NOSPLITSUGS, and excluding words from suggestions with NOSUGGEST. It covers defining common mistakes with REP for corrections and similar characters with MAP to prioritize suggestions. Finally, it mentions .SUG file creation.