information for the spell file(s) used for
the current buffer.
CHARACTER TABLES
*spell-affix-chars*
When using an 8-bit encoding the affix file should define what characters are
word characters. This is because the system where ":mkspell" is used may not
support a locale with this encoding and isalpha() won't work. For example
when using "cp1250" on Unix.
*E761* *E762* *spell-FOL*
*spell-LOW* *spell-UPP*
Three lines in the affix file are needed. Simplistic example:
FOL áëñ ~
LOW áëñ ~
UPP ÁËÑ ~
All three lines must have exactly the same number of characters.
The "FOL" line specifies the case-folded characters. These are used to
compare words while ignoring case. For most encodings this is identical to
the lower case line.
The "LOW" line specifies the characters in lower-case. Mostly it's equal to
the "FOL" line.
The "UPP" line specifies the characters with upper-case. That is, a character
is upper-case where it's different from the character at the same position in
"FOL".
An exception is made for the German sharp s ß. The upper-case version is
"SS". In the FOL/LOW/UPP lines it should be included, so that it's recognized
as a word character, but use the ß character in all three.
ASCII characters should be omitted, Vim always handles these in the same way.
When the encoding is UTF-8 no word characters need to be specified.
*E763*
Vim allows you to use spell checking for several languages in the same file.
You can list them in the 'spelllang' option. As a consequence all spell files
for the same encoding must use the same word characters, otherwise they can't
be combined without errors.
If you get an E763 warning that the word tables differ you need to update your
".spl" spell files. If you downloaded the files, get the latest version of
all spell files you use. If you are only using one, e.g., German, then also
download the recent English spell files. Otherwise generate the .spl file
again with |:mkspell|. If you still get errors check the FOL, LOW and UPP
lines in the used .aff files.
The XX.ascii.spl spell file generated with the "-ascii" argument will not
contain the table with characters, so that it can be combine with spell files
for any encoding. The .add.spl files also do not contain the table.
MID-WORD CHARACTERS
*spell-midword*
Some characters are only to be considered word characters if they are used in
between two ordinary word characters. An example is the single quote: It is
often used to put text in quotes, thus it can't be recognized as a word
character, but when it appears in between word characters it must be part of
the word. This is needed to detect a spelling error such as they'are. That
should be they're, but since "they" and "are" are words themselves that would
go unnoticed.
These characters are defined with MIDWORD in the .aff file. Example:
MIDWORD '- ~
FLAG TYPES *spell-FLAG*
Flags are used to specify the affixes that can be used with a word and for
other properties of the word. Normally single-character flags are used. This
limits the number of possible flags, especially for 8-bit encodings. The FLAG
item can be used if more affixes are to be used. Possible values:
FLAG long use two-character flags
FLAG num use numbers, from 1 up to 65000
FLAG caplong use one-character flags without A-Z and two-character
flags that start with A-Z
With "FLAG num" the numbers in a list of affixes need to be separated with a
comma: "234,2143,1435". This method is inefficient, but useful if the file is
generated with a program.
When using "caplong" the two-character flags all start with a capital: "Aa",
"B1", "BB", etc. This is useful to use one-character flags for the most
common items and two-character flags for uncommon items.
Note: When using utf-8 only characters up to 65000 may be used for flags.
Note: even when using "num" or "long" the number of flags available to
compounding and prefixes is limited to about 250.