spell.txt ForVim version 9.1. Last change: 2024 Oct 05VIM REFERENCE MANUAL by Bram MoolenaarSpell checkingspell1. Quick startspell-quickstart2. Remarks onspell checkingspell-remarks3. Generatingaspell filespell-mkspell4. Spell file formatspell-file-format{not available when the |+syntax| feature has been disabled at compile time}Note: There alsoisa vimspell plugin. If you haveit you cando ":helpvimspell" to find about it. But you will probably want to get rid of theplugin and use the'spell' option instead,it works better.==============================================================================1. Quick startspell-quickstartE756This command switches onspell checking::setlocal spell spelllang=en_usThis switches on the'spell' option andspecifies to check for US English.The words that are not recognized are highlighted with one of these:SpellBadword not recognizedhl-SpellBadSpellCapword not capitalisedhl-SpellCapSpellRarerarewordhl-SpellRareSpellLocalwrong spelling for selected regionhl-SpellLocalVim only checks words for spelling, thereis no grammar check.If the'mousemodel' optionis set to "popup" and the cursoris ona badlyspelledword oritis "popup_setpos" and the mouse pointeris ona badlyspelled word, then thepopup menu will containa submenu to replace the badword.Note: this slows down the appearance of thepopup menu.Note for GTK:don't release the right mouse button until the menu appears, otherwiseitwon't work.To search for the next misspelled word:]s]sMove to next misspelledword after the cursor.Acount before the command can be used to repeat.'wrapscan' applies.[s[sLike "]s" but search backwards, find the misspelledword before the cursor. Doesn't recognize wordssplit over two lines, thus may stopat words that arenot highlightedas bad. Does not stopatword withmissing capitalat the start ofa line.]S]SLike "]s" but only stopat bad words, notat rarewords or words for another region.[S[SLike "]S" but search backwards.]r]rMove to next "rare"word after the cursor.Acount before the command can be used to repeat.'wrapscan' applies.[r[rLike "]r" but search backwards, find the "rare"word before the cursor. Doesn't recognize wordssplit over two lines, thus may stopat words that arenot highlightedas rare.To add words to your ownword list:zgzgAddword under the cursorasa goodword to the firstname in'spellfile'.Acount may precede the commandto indicate the entry in'spellfile' to be used.Acount of two uses the second entry.InVisual mode the selected characters are addedasaword (including white space!).When the cursoris on text thatis markedas badlyspelled then the marked textis used.Otherwise theword under the cursor, separated bynon-word characters,is used.If thewordis explicitly markedas badword inanotherspell file the resultis unpredictable.zGzGLike "zg" but add theword to the internalwordlistinternal-wordlist.zwzwLike "zg" butmark thewordasa wrong (bad) word.If theword already appears in'spellfile'itisturned intoa comment line. Seespellfile-cleanupfor getting rid of those.zWzWLike "zw" but add theword to the internalwordlistinternal-wordlist.zuwzugzuwzugUndozw andzg, remove theword from the entry in'spellfile'. Count usedas withzg.zuWzuGzuWzuGUndozW andzG, remove theword from the internalword list. Count usedas withzg.:spe:spellgoodE1280:[count]spe[llgood]{word}Add{word}asa goodword to'spellfile', like withzg. Withoutcount the first nameis used, withacount of two the second entry, etc.:spe[llgood]!{word}Add{word}asa goodword to the internalword list,like withzG.:spellw:spellwrong:[count]spellw[rong]{word}Add{word}asa wrong (bad)word to'spellfile',aswithzw. Withoutcount the first nameis used, withacount of two the second entry, etc.:spellw[rong]!{word}Add{word}asa wrong (bad)word to the internalwordlist, like withzW.:spellra:spellrare:[count]spellra[re]{word}Add{word}asa rareword to'spellfile', similar tozw. Withoutcount the first nameis used, withacount of two the second entry, etc.There are no normal mode commands tomark wordsasrareas thisisa fairly uncommon command and allintuitive commands for this are already taken. If youwant you can add mappings with e.g.:nnoremap z? :exe ':spellrare ' .. expand('<cWORD>')<CR>nnoremap z/ :exe ':spellrare! ' .. expand('<cWORD>')<CR>:spellundo,zuw, orzuW can be used toundo this.:spellra[re]!{word}Add{word}asa rareword to the internalwordlist, similar tozW.:[count]spellu[ndo]{word}:spellu:spellundoLikezuw.[count] usedas with:spellgood.:spellu[ndo]!{word}LikezuW.[count] usedas with:spellgood.After addingaword 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 ofcommands mostly works well::edit <file in 'spellfile'>(make changes to thespell file):mkspell! %More details about the'spellfile' format belowspell-wordlist-format.internal-wordlistThe internalwordlistis used for allbuffers where'spell'is set. Itisnot stored,itis lost when you exit Vim. Itis also cleared when'encoding'is set.Finding suggestions for bad words:z=z=For theword under/after the cursor suggest correctlyspelled words. This also works to find alternativesforaword thatis not highlightedasa bad word,e.g., when theword afteritis bad.InVisual mode the highlighted textis takenas theword to be replaced.The results are sorted on similarity to theword beingreplaced.This may takea long time. HitCTRL-C when you getbored.If the commandis used withoutacount thealternatives are listed and you can enter the numberof your choice or press<Enter> if you don't want toreplace. You can also use the mouse to click on yourchoice (only works if the mouse can be used inNormalmode and when there are no line wraps). Click on thefirst line (the header) to cancel.The suggestions listed normally replacea highlightedbad word. Sometimes they include other text, in thatcase the replaced textis also listed aftera "<".Ifacountis used that suggestionis used, withoutprompting. For example, "1z=" always takes the firstsuggestion.If'verbose'is non-zeroa score will be displayedwith the suggestions to indicate the likeliness to thebadly spelledword (the higher the score the moredifferent).Whenaword was replaced theredo command "." willrepeat theword replacement. This works like "ciw",the goodword and<Esc>. This does NOT work for Thaiand other languages without spaces between words.:spellr:spellrepallE752E753:spellr[epall]Repeat the replacement done byz= for all matcheswith the replacedword in the current window.InInsert mode, when the cursoris aftera badly spelled word, you can useCTRL-Xs to find suggestions. This works likeInsert mode completion. UseCTRL-N to use the next suggestion,CTRL-P togo back.i_CTRL-X_sThe'spellsuggest' option influences how thelist of suggestionsis generatedand sorted. See'spellsuggest'.The'spellcapcheck' optionis used to check the firstword ofasentencestarts witha capital. This doesn't work for the firstword in the file.When thereisa line break right afterasentence the highlighting of the nextline may be postponed. UseCTRL-L when needed. Also seeset-spc-auto forhowit can be set automatically when'spelllang'is set.The'spelloptions' option hasa few more flags that influence the wayspellchecking works. For example, "camel" splits CamelCased words so that eachpart of thewordis spell-checked separately.Vim counts the number of timesa goodwordis encountered. Thisis used tosort the suggestions: words that have been seen before geta small bonus,words that have been seen often geta bigger bonus. The COMMON item in theaffix file can be used to define common words, so that this mechanism alsoworks ina new or short filespell-COMMON.==============================================================================2. Remarks onspell checkingspell-remarksPERFORMANCEVim does on-the-flyspell checking. To make this work fast thewordlistisloaded in memory. Thus this usesa lot of memory (1 Mbyte or more). Theremight also bea noticeable delay when thewordlistis loaded, which happenswhen'spell'is set and when'spelllang'is set while'spell' was already set.To minimize the delay eachwordlistis only loaded once,itis not deletedwhen'spelllang'is made empty or'spell'is reset. When'encoding'is setall theword lists are reloaded, thus you may noticea delay then too.REGIONSAword may be spelled differently invarious regions. For example, Englishcomes in (at least) these variants:enall regionsen_auAustraliaen_caCanadaen_gbGreat Britainen_nzNew Zealanden_usUSAWords that are not used in one region but are used in another region arehighlighted with SpellLocalhl-SpellLocal.Always uselowercase letters for the language and region names.When addingaword withzg or another command it's always added for allregions. You can change that by manually editing the'spellfile'. Seespell-wordlist-format.Note that the regionsas specified in the files in'spellfile' are only used when all entries in'spelllang' specify the sameregion (not counting files specified by their .spl name).spell-germanSpecific exception: For German these special regions are used:deall German words acceptedde_deold and new spellingde_19old spellingde_20new spellingde_atAustriade_chSwitzerlandspell-russianSpecific exception: ForRussian these special regions are used:ruallRussian words acceptedru_ru"IE"letter spellingru_yo"YO"letter spellingspell-yiddishYiddish requires using "utf-8" encoding, because of the special charactersused. If you are using latin1 Vim will use transliterated (romanized) Yiddishinstead. If you want to use transliterated Yiddish withutf-8 use "yi-tr".Ina table:'encoding''spelllang'utf-8yiYiddishlatin1yitransliterated Yiddishutf-8yi-trtransliterated Yiddishspell-cjkChinese,Japanese and other East Asian characters are normally markedaserrors, becausespell checking of these charactersis not supported. If'spelllang' includes "cjk", these characters are not markedas errors. Thisis useful when editing text withspell checking while some Asian words arepresent.SPELL FILESspell-loadVim searches forspell files in the "spell" subdirectory of the directories in'runtimepath'. The name is: LL.EEE.spl, where:LLthe language nameEEEthe value of'encoding'The value for "LL" comes from'spelllang', but excludes the region name.Examples:'spelllang'LLen_usenen-rareen-raremedical_camedicalOnly the first fileis loaded, the one thatis first in'runtimepath'. Ifthis succeeds then additionally files with the name LL.EEE.add.spl are loaded.All the ones that are found are used.If nospell fileis found theSpellFileMissingautocommand eventistriggered. This may trigger thespellfile.vimplugin to offer youdownloading thespell file.Additionally, the files related to the names in'spellfile' are loaded. Theseare the files thatzg andzw add good and wrong words to.Exceptions:- Vim uses "latin1" when'encoding'is "iso-8859-15". Theeuro sign doesn't matter for spelling.- When nospell file for'encoding'is found "ascii"is tried. This only works for languages where nearly all words are ASCII, suchas English. It helps when'encoding'is not "latin1", suchas iso-8859-2, and English textis being edited. For the ".add" files the same nameas the found mainspell fileis used.For example, with these values:'runtimepath'is "~/.vim,/usr/share/vim82,~/.vim/after"'encoding'is "iso-8859-2"'spelllang'is "pl"Vim will look for:1. ~/.vim/spell/pl.iso-8859-2.spl2. /usr/share/vim82/spell/pl.iso-8859-2.spl3. ~/.vim/spell/pl.iso-8859-2.add.spl4. /usr/share/vim82/spell/pl.iso-8859-2.add.spl5. ~/.vim/after/spell/pl.iso-8859-2.add.splThis assumes 1.is not found and 2.is found.If'encoding'is "latin1" Vim will look for:1. ~/.vim/spell/pl.latin1.spl2. /usr/share/vim82/spell/pl.latin1.spl3. ~/.vim/after/spell/pl.latin1.spl4. ~/.vim/spell/pl.ascii.spl5. /usr/share/vim82/spell/pl.ascii.spl6. ~/.vim/after/spell/pl.ascii.splThis assumes none of them are found (Polish doesn't make sense when leavingout the non-ASCII characters).Spelling for EBCDICis currently not supported.Aspell file might not be available in the current'encoding'. Seespell-mkspell about how to createaspell file. Convertingaspell filewith "iconv" will NOT work!Note: onVMS ".{enc}.spl"is changed to "_{enc}.spl" to avoid trouble withfilenames.spell-sug-fileE781If thereisa file with exactly the same nameas the ".spl" file but ending in".sug", that file will be used for giving better suggestions. It isn't loadedbefore suggestions are made to reduce memory use.E758E759E778E779E780E782When loadingaspell file Vim checks thatitis properly formatted. If youget an error the file may be truncated, modified or intended for another Vimversion.SPELLFILE CLEANUPspellfile-cleanupThezw command turns existing entries in'spellfile' into comment lines.This avoids having to writea new file every time, but results in the fileonly getting longer, never shorter. To clean up the comment lines in all".add"spell filesdo this::runtime spell/cleanadd.vimThis deletes all comment lines, except the ones that start with "##". Use"##" lines to add comments that you want to keep.You can invoke thisscriptas oftenas you like.A variableis provided toskip updating files that have been changed recently. Setit to the number ofseconds that has passed sincea file was changed beforeit will be cleaned.For example, to clean only files that were not changed in the last hour: let g:spell_clean_limit = 60 * 60The defaultis one second.WORDSVim usesa fixedmethod to recognizea word. Thisis independent of'iskeyword', so thatit also works inhelp files and for languages thatinclude characters like '-' in'iskeyword'. Theword charactersdo depend on'encoding'.The table withword charactersis stored in the main .spl file. Thereforeitmatters what the currentlocaleis when generating it!A .add.spl file doesnot containaword table though.Foraword that starts witha digit the digitis ignored, unless thewordasawholeis recognized. Thus if "3D"isaword and "D"is not then "3D"isrecognizedasa word, but if "3D"is notaword then only the "D"is markedasbad. Hex numbers in the form 0x12ab and 0X12AB are recognized.WORD COMBINATIONSItis possible to spell-check words that includea space. Thisis used torecognize words that are invalid when used by themselves, e.g. for "et al.".It can also be used to recognize "the the" and highlight it.The number of spacesis irrelevant. In most casesa line break may alsoappear. However, this makesit difficult to find out where to start checkingfor spelling mistakes. When you makea change to one line and only that lineis redrawn Vim won't look in the previous line, thus when "et"isat theendof the previous line "al." will be flaggedas an error. And when you type"the<CR>the" the highlighting doesn't appear until the first lineis redrawn.UseCTRL-L to redraw right away. "[s" will also stopataword combinationwitha line break.When encounteringa line break Vim skips characters suchas'*', '>' and'"',so that comments in C, shell and Vim code can bespell checked.SYNTAX HIGHLIGHTINGspell-syntaxFiles that usesyntax highlighting can specify wherespell checking should bedone:1. everywhere default2. in specific items use "contains=@Spell"3. everywhere but specific items use "contains=@NoSpell"For the secondmethod adding the @NoSpell cluster will disablespell checkingagain. This can be used, for example, to add @Spell to the comments ofaprogram, and add @NoSpell for items that shouldn't be checked.Also see:syn-spell for text thatis not inasyntax item.VIM SCRIPTSIf you want to writea Vimscript that does something with spelling, you mayfind thesefunctions useful:spellbadword()find badly spelledwordat the cursorspellsuggest()getlist of spelling suggestionssoundfold()get the sound-a-like version ofawordSETTING'spellcapcheck' AUTOMATICALLYset-spc-autoAfter the'spelllang' option has been set successfully, Vim will source thefiles "spell/LANG.vim" in'runtimepath'. "LANG"is the value of'spelllang'up to the first comma, dot or underscore. This can be used to setoptionsspecifically for the language, especially'spellcapcheck'.Thedistribution includesa few of these files. Use this command to see whatthey do::next $VIMRUNTIME/spell/*.vimNote that the default scripts don't set'spellcapcheck' ifit was changed fromthe default value. This assumes the user prefers another value then.DOUBLE SCORINGspell-double-scoringThe'spellsuggest' option can be used to select "double" scoring. Thismechanismis based on the principle that there are two kinds of spellingmistakes:1. You know how tospell the word, but mistype something. This results ina small editing distance (character swapped/omitted/inserted) and possiblyaword that sounds completely different.2. You don't know how tospell theword and type something that sounds right. The edit distance can be big but thewordis similar after sound-folding.Since scores for these two mistakes will be very different we usealistfor each and mix them.The sound-foldingis slow and people that know the language won't make thesecond kind of mistakes. Therefore'spellsuggest' can be set to select thepreferredmethod for scoring the suggestions.==============================================================================3. Generatingaspell filespell-mkspellVim usesa binary file format for spelling. This greatly speeds up loadingthewordlist and keepsit small..aff.dicMyspellYou can createa Vimspell file from the.aff and.dic files thatMyspelluses.Myspellis used by OpenOffice.org and Mozilla. The OpenOffice .oxtfiles arezip files which contain the.aff and.dic files. You should be ableto find them here:http://extensions.services.openoffice.org/dictionaryThe older, OpenOffice 2 files may be used if this doesn't work:http://wiki.services.openoffice.org/wiki/DictionariesYou can also usea plainword list. The results are the same, the choicedepends on whatword lists you can find.If youinstall Aap (from www.a-a-p.org) you can use the recipes in theruntime/spell/??/ directories. Aap will take care of downloading the files,apply patches needed for Vim and build the .spl file.Make sure your currentlocaleis set properly, otherwise Vim doesn't know whatcharacters are upper/lowercase letters. If thelocale isn't available (e.g.,when using anMS-Windows codepage on Unix) add tables to the.aff filespell-affix-chars. If the.aff file doesn't definea table then thewordtable of the currently active spellingis used. If spellingis not activethen Vim will try to guess.:mksp:mkspell:mksp[ell][!][-ascii]{outname}{inname}...Generatea Vimspell file fromword lists. Example::mkspell /tmp/nl nl_NL.wordsE751When{outname} ends in ".spl"itis usedas the outputfile name. Otherwiseit should bea language name,suchas "en", without the region name. The filewritten will be "{outname}.{encoding}.spl", where{encoding}is the value of the'encoding' option.When the output file already exists [!]must be usedto overwrite it.When the[-ascii] argumentis present, words withnon-ascii characters are skipped. The resulting fileends in "ascii.spl".The input can be theMyspell format files{inname}.affand{inname}.dic. If{inname}.aff does not exist then{inname}is usedas the file name ofa plainwordlist.Multiple{inname} arguments can be given to combineregions into one Vimspell file. Example::mkspell ~/.vim/spell/en /tmp/en_US /tmp/en_CA /tmp/en_AUThis combines the Englishword lists for US, CA and AUinto one en.spl file.Up to eight regions can be combined.E754E755The REP and SAL items of the first.aff file wherethey appear are used.spell-REPspell-SALE845This command usesa lot of memory, required to findthe optimalword tree (Polish, Italian and Hungarianrequire several hundred Mbyte). The final result willbe much smaller, because compressionis used. Toavoid running out of memory compression will be donenow and then. This can be tuned with the'mkspellmem'option.After thespell file was written andit was being usedina bufferit will be reloaded automatically.:mksp[ell][-ascii]{name}.{enc}.addLike ":mkspell" above, using{name}.{enc}.addas theinput file and producing an output file in the samedirectory that has ".spl" appended.:mksp[ell][-ascii]{name}Like ":mkspell" above, using{name}as the input fileand producing an output file in the same directorythat has ".{enc}.spl" appended.Vim will report the number of duplicate words. This might bea mistake in thelist of words. But sometimesitis used to have different prefixes andsuffixes for the same basicword to avoid them combining (e.g. Czech usesthis). If you want Vim to report all duplicate words set the'verbose'option.Since you might want to changeaMyspellwordlist for use with Vim thefollowing procedureis recommended:1. Obtain the xx_YY.aff and xx_YY.dic files from Myspell.2. Makea copy of these files to xx_YY.orig.aff and xx_YY.orig.dic.3. Change the xx_YY.aff and xx_YY.dic files to remove bad words, add missing words, defineword characters with FOL/LOW/UPP, etc. The distributed "*.diff" files can be used.4. Start Vim with the rightlocale and use:mkspell to generate the Vimspell file.5. Try out thespell file with ":setspell spelllang=xx" if you wroteit inaspell directory in'runtimepath', or ":set spelllang=xx.enc.spl" if you wroteit somewhere else.When theMyspell files are updated you canmerge the differences:1. Obtain the newMyspell filesas xx_YY.new.aff and xx_UU.new.dic.2. Use Vimdiff to see what changed:vimdiff xx_YY.orig.dic xx_YY.new.dic3. Take over the changes you like in xx_YY.dic. You may also need to change xx_YY.aff.4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.orig.aff.SPELL FILE VERSIONSE770E771E772Spell checkingisa relatively new feature in Vim, thus it's possible that the.spl file format will be changed to support more languages. Vim will checkthe validity of thespell file and report anything wrong.E771: Old spell file, needs to be updatedThisspell fileis older than your Vim. You need to update the .spl file.E772: Spell file is for newer version of VimThis means thespell file was made fora later version of Vim. You need toupdate Vim.E770: Unsupported section in spell fileThis means thespell file was made fora later version of Vim and containsasection thatis required for thespell file to work. In thiscase it'sprobablya good idea to upgrade your Vim.SPELL FILE DUMPIf for some reason you want to check what words are supported by the currentlyused spelling files, use this command::spelldump:spelld:spelld[ump]Opena newwindow and fillit with all currently validwords. Compound words are not included.Note: For some languages the result may be enormous,causing Vim to run out of memory.:spelld[ump]!Like ":spelldump" and include theword count. Thisisthe number of times theword was found whileupdating the screen. Words that are in COMMON itemsgetastartingcount of 10.The format of thewordlistis usedspell-wordlist-format. You should beable to readit with ":mkspell" to generate one .spl file that includes allthe words.When all entries to'spelllang' use the same regions or no regionsat all thenthe region informationis included in the dumped words. Otherwise only wordsfor the current region are included and no "/regions" lineis generated.Comment lines with the name of the .spl file are usedasa header above thewords that were generated from that .spl file.SPELL FILE MISSINGspell-SpellFileMissingspellfile.vimIf thespell file for the language you are usingis not available, you willget an error message. But if the "spellfile.vim"pluginis activeit willoffer you todownload thespell file. Just follow the instructions,it willask you where to write the file (theremust bea writable directory in'runtimepath' for this).Theplugin hasa default place where to look forspell files, on the Vimftpserver. The protocol usedis SSL (https://) for security. If you want to useanother location or another protocol, set the g:spellfile_URL variable to thedirectory that holds thespell files. You can use http:// or ftp://, but youare takinga security risk then. Thenetrwpluginis used for getting thefile, look there for the specificsyntax of the URL. Example:let g:spellfile_URL = 'https://ftp.nluug.nl/vim/runtime/spell'You may need toescape special characters.Theplugin will only ask about downloadinga language once. If you want totry again anyway restart Vim, or set g:spellfile_URL to another value (e.g.,prependa space).To avoid using the "spellfile.vim"plugindo this in yourvimrc file:let loaded_spellfile_plugin = 1Instead of using theplugin you can defineaSpellFileMissingautocommand tohandle the missing file yourself. You can useit like this::au SpellFileMissing * call Download_spell_file(expand('<amatch>'))Thus the<amatch> item contains the name of the language. Another importantvalueis'encoding', since every encoding has its ownspell file. With twoexceptions:- For ISO-8859-15 (latin9) the name "latin1"is used (the encodings only differ in characters not used in dictionary words).- The name "ascii" may also be used for some languages where the words use only ASCII letters for most of the words.The default "spellfile.vim"plugin uses this autocommand, if you define yourautocommand afterwards you may want to use ":au!SpellFileMissing" to overruleit. If you define yourautocommand before thepluginis loadedit will noticethis and notdo anything.E797Note that theSpellFileMissingautocommandmust not change or destroy thebuffer the user was editing.==============================================================================4. Spell file formatspell-file-formatThisis the format of the files that are used by the person who creates andmaintainsaword list.Note that we avoid theword "dictionary" here. Thatis because the goal ofspell checking differs fromwritinga dictionary (as in the book). Forspelling we needalist of words that are OK, thus should not be highlighted.Person and company names will not appear ina dictionary, butdo appear inaword list. And some old words are rarely used while they are commonmisspellings. Thesedo appear ina dictionary but not inaword list.There are two formats:A straightlist of words andalist using affixcompression. The files with affix compression are used byMyspell (Mozillaand OpenOffice.org). This requires two files, one with.aff and one with.dicextension.FORMAT OF STRAIGHT WORD LISTspell-wordlist-formatThe wordsmust appear one per line. Thatis all thatis required.Additionally the following items are recognized:- Empty and blank lines are ignored.# comment- Linesstarting witha# are ignored (comment lines)./encoding=utf-8-A linestarting with "/encoding=", before any word,specifies the encoding of the file. After the second '=' comes an encoding name. This tells Vim to setup conversion from the specified encoding to'encoding'. Thus you can use onewordlist for several target encodings./regions=usca-A linestarting with "/regions="specifies the region names that are supported. Each region namemust be two ASCII letters. The first oneis region 1. Thus "/regions=usca" has region 1 "us" and region 2 "ca". In an additionwordlist the region names should be equal to the mainword list!- Other linesstarting with '/' are reserved for future use. The ones that are not recognized are ignored. Youdo geta warning message, so that you know something won't work.-A "/" may follow theword with the following items:=Casemust match exactly.?Rare word.!Bad (wrong) word. 1 to 9A region in which thewordis valid. If no regions arespecified thewordis valid in all regions.Example:# Thisis an examplewordlistcomment/encoding=latin1encoding of the file/regions=uscagbregions "us", "ca" and "gb"exampleword for all regionsblah/12word for regions "us" and "ca"vim/!badwordCampbell/?3rareword in region 3 "gb"'s mornings/=keep-casewordNote that when "/="is used the sameword with all upper-case lettersis notaccepted. Thisis different fromaword with mixedcase thatis automaticallymarkedas keep-case, those words may appear in all upper-case letters.FORMAT WITH .AFF AND .DIC FILESaff-dic-formatThere are two files: the basicwordlist and an affix file. The affix filespecifies settings for the language and can contain affixes. The affixes areused to modify the basic words to get the fullword list. This significantlyreduces the number of words, especially fora language like Polish. Thisiscalled affix compression.The basicwordlist and the affix file are combined with the ":mkspell"command and results ina binaryspell file. All the preprocessing has beendone, thus this file loads fast. The binaryspell file formatis described inthe source code (src/spell.c). But only developers need to know about it.The preprocessing also allows us to take theMyspell language files and modifythem before the Vimwordlistis made. The tools for this can be found in the"src/spell" directory.The format for the affix andwordlist filesis based on whatMyspell uses(thespell checker of Mozilla and OpenOffice.org).A description can be foundhere:http://lingucomponent.openoffice.org/affix.readmeNote that affixes arecase sensitive, this isn't obvious from the description.Vim supports quitea few extras. They are described belowspell-affix-vim.Attempts have been made to keep this compatible with otherspell checkers, sothat the same files can often be used. One other project that offers morethanMyspellis Hunspell(http://hunspell.sf.net ).WORD LIST FORMATspell-dic-formatA short example, with line numbers:112342aan3Als4Etten-Leur5et al.6's-Gravenhage7's-Gravenhaags8# word that differs between regions9kado/110cadeau/211TCP,IP12/the S affix may add a 's'13bedel/SThe first line contains the number of words. Vim ignores it, but youdo getan error message if it's not there.E760What followsis oneword per line. Whitespaceat theend of the lineisignored, all other whitespace matters. The encodingis specified in theaffix filespell-SET.Comment lines start with '#' or '/'. See the example lines 8 and 12.Notethat puttinga comment afterawordis NOT allowed:someword # comment that causes an error!After theword thereis an optional slash and flags. Most of these flags areletters that indicate the affixes that can be used with this word. These arespecified with SFX and PFX lines in the.aff file, seespell-SFX andspell-PFX. Vim allows using other flag types with the FLAG item in theaffix filespell-FLAG.When theword only has lower-case lettersit will also match with thewordstarting with an upper-case letter.When theword includes an upper-case letter, this means the upper-caseletteris requiredat this position. The sameword witha lower-caseletterat thisposition will not match. When some of the other letters are upper-caseit willnot match either.Theword with all upper-case characters will always be OK,word listmatchesdoes not matchalsals Als ALSALs AlS aLs aLSAlsAls ALSals ALs AlS aLs aLSALSALSals Als ALs AlS aLs aLSAlSAlS ALSals Als ALs aLs aLSThe KEEPCASE affix ID can be used to specifically matchaword with identicalcase only, see belowspell-KEEPCASE.Note: in line 5 to 7 non-word characters are used. You can include anycharacter ina word. When checking the textaword still only matches whenitappears witha non-word character before and after it. ForMyspellawordstarting witha non-word character probably won't work.In line 12 theword "TCP/IP"is defined. Since the slash hasa specialmeaning the commais used instead. Thisis defined with the SLASH item in theaffix file, seespell-SLASH.Note that without this SLASH item thewordwill be "TCP,IP".AFFIX FILE FORMATspell-aff-formatspell-affix-vimspell-affix-commentComment lines in the.aff file start witha '#':# comment lineItems witha fixed number of arguments can be followed bya comment. But onlyif none of the arguments can contain white space. The commentmust start witha "#" character. Example:KEEPCASE = # fix case for words with this flagENCODINGspell-SETThe affix file can be in any encoding thatis supported by "iconv". However,in some cases the currentlocale should also be set properlyat the time:mkspellis invoked. Adding FOL/LOW/UPP lines removes this requirementspell-FOL.The encoding should be specified before anything where the encoding matters.The encoding applies both to the affix file and the dictionary file. Itisdone witha SET line:SET utf-8The encoding can be different from the value of the'encoding' optionat thetime ":mkspell"is used. Vim will then convert everything to'encoding' andgenerateaspell file for'encoding'. If some of the used characters to notfit in'encoding' you will get an error message.spell-affix-mbyteWhen usingamultibyte encoding it's possible to use more different affixflags. ButMyspell doesn't support that, thus you may not want to useitanyway. For compatibility use an 8-bit encoding.INFORMATIONThese entries in the affix file can be used to add information to thespellfile. There are no restrictions on the format, but they should be in theright encoding.spell-NAMEspell-VERSIONspell-HOMEspell-AUTHORspell-EMAILspell-COPYRIGHTNAMEName of the languageVERSION1.0.1 with fixesHOME<URL>AUTHORJohn DoeEMAILjohn AT Doe DOT netCOPYRIGHTLGPLThese fields areput in the .spl file as-is. The:spellinfo command can beused toview the info.:spellinfo:spelli:spelli[nfo]Display the information for thespell file(s) used forthe current buffer.CHARACTER TABLESspell-affix-charsWhen using an 8-bit encoding the affix file should define what characters areword characters. Thisis because the system where ":mkspell"is used may notsupportalocale with this encoding and isalpha() won't work. For examplewhen using "cp1250" on Unix.E761E762spell-FOLspell-LOWspell-UPPThree lines in the affix file are needed. Simplistic example:FOL áëñLOW áëñUPP ÁËÑAll three linesmust have exactly the same number of characters.The "FOL" linespecifies the case-folded characters. These are used tocompare words while ignoring case. For most encodings thisis identical tothe lowercase line.The "LOW" linespecifies the characters in lower-case. Mostly it's equal tothe "FOL" line.The "UPP" linespecifies the characters with upper-case. That is,a characteris upper-case where it's different from the characterat the same position in"FOL".An exceptionis made for the German sharps ß. The upper-case versionis"SS". In the FOL/LOW/UPP linesit should be included, so that it's recognizedasaword character, but use the ß character in all three.ASCII characters should be omitted, Vim always handles these in the same way.When the encodingisUTF-8 noword characters need to be specified.E763Vim allows you to usespell checking for several languages in the same file.You canlist them in the'spelllang' option. Asa consequence allspell filesfor the same encodingmust use the sameword characters, otherwise they can'tbe combined without errors.If you get anE763 warning that theword tables differ you need to update your".spl"spell files. If you downloaded the files, get the latest version ofallspell files you use. If you are only using one, e.g., German, then alsodownload the recent Englishspell files. Otherwise generate the .spl fileagain with:mkspell. If you still geterrors check the FOL, LOW and UPPlines in the used.aff files.The XX.ascii.splspell file generated with the "-ascii" argument will notcontain the table with characters, so thatit can be combine withspell filesfor any encoding. The .add.spl files alsodo not contain the table.MID-WORD CHARACTERSspell-midwordSome characters are only to be consideredword characters if they are used inbetween two ordinaryword characters. An exampleis the singlequote: Itisoften used toput text in quotes, thusit can't be recognizedasawordcharacter, but whenit appears in betweenword charactersitmust be part ofthe word. Thisis needed to detecta spelling error suchas they'are. Thatshould be they're, but since "they" and "are" are words themselves that wouldgo unnoticed.These characters are defined with MIDWORD in the.aff file. Example:MIDWORD'-FLAG TYPESspell-FLAGFlags are used to specify the affixes that can be used withaword and forother properties of the word. Normally single-character flags are used. Thislimits the number of possible flags, especially for 8-bit encodings. The FLAGitem can be used if more affixes are to be used. Possible values:FLAG longuse two-character flagsFLAG numuse numbers, from 1 up to 65000FLAG caplonguse one-character flags without A-Z and two-characterflags that start with A-ZWith "FLAG num" the numbers inalist of affixes need to be separated withacomma: "234,2143,1435". Thismethodis inefficient, but useful if the fileisgenerated witha program.When using "caplong" the two-character flags all start witha capital: "Aa","B1", "BB", etc. Thisis useful to use one-character flags for the mostcommon items and two-character flags for uncommon items.Note: When usingutf-8 only characters up to 65000 may be used for flags.Note: even when using "num" or "long" the number of flags available tocompounding and prefixesis limited to about 250.AFFIXESspell-PFXspell-SFXThe usual PFX (prefix) and SFX (suffix) lines are supported (see theMyspelldocumentation or the Aspell manual:http://aspell.net/man-html/Affix-Compression.html).Summary:SFX L Y 2SFX L 0 re [^x]SFX L 0 ro xThe first lineisa header and has four fields:SFX{flag}{combine}{count}{flag}The name used for the suffix. Mostly it'sa single letter,but other characters can be used, seespell-FLAG.{combine}Can be 'Y' or 'N'. When 'Y' then theword plus suffix canalso havea prefix. When 'N' thena prefixis not allowed.{count}The number of lines following. If thisis wrong you will getan error message.For PFX the fields are exactly the same.The basic format for the following lines is:SFX{flag}{strip}{add}{condition}{extra}{flag}Must be the sameas the{flag} used in the first line.{strip}Characters removed from the basic word. Thereis no check ifthe characters are actually there, only the lengthis used (inbytes). This better match the{condition}, otherwise strangethings may happen. If the{strip} lengthis equal to orlonger than the basicword the suffix won't be used.When{strip}is0 (zero) then nothingis stripped.{add}Characters added to the basic word, after removing{strip}.Optionally thereisa '/' followed by flags. The flags applyto theword plus affix. Seespell-affix-flags{condition}A simplistic pattern. Only when this matches witha basicword will the suffix be used for that word. Thisis normallyfor using one suffixletter with different{add} and{strip}fields for words with different endings.When{condition}isa. (dot) thereis no condition.Thepattern may contain:- Literal characters.-A set of characters in [].[abc] matches a,b and c.A dashis allowed fora range[a-c], but thisis Vim-specific.-A set of characters that starts witha ^, meaning the complement of the specified characters.[^abc] matches any character but a,b and c.{extra}Optional extra text:# commentCommentis ignored-Hunspell uses this, ignoredFor PFX the fields are the same, but the{strip},{add} and{condition} applyto the start of the word.Note:Myspell ignores any extra text after the relevant info. Vim requiresthis text to start witha "#" so that mistakes don'tgo unnoticed. Example:SFX F 0 in [^i]n # Spion > SpioninSFX F 0 nen in# Bauerin > BauerinnenHowever, to avoid lots oferrors in affix files written for Myspell, you canadd the IGNOREEXTRA flag.ApparentlyMyspell allows an affix name to appear more than once. Since thismight also bea mistake, Vim checks for an extra "S". The affix files forMyspell that use this feature apparently have this flag. Example:SFX a Y 1 SSFX a 0 an .SFX a Y 2 SSFX a 0 en .SFX a 0 on .AFFIX FLAGSspell-affix-flagsThisisa feature that comes from Hunspell: The affix may specify flags. Thisworks similar to flags specified ona basic word. The flags apply to thebasicword plus the affix (but there are restrictions). Example:SFX S Y 1SFX S 0 s .SFX A Y 1SFX A 0 able/S .When the dictionary file contains "drink/AS" then these words are possible:drinkdrinksusesS suffixdrinkableusesA suffixdrinkablesusesA suffix and thenS suffixGenerally the flags of the suffix are added to the flags of the basic word,both are used for theword plus suffix. But the flags of the basicword areonly used once for affixes, except that both one prefix and one suffix can beused when both support combining.Specifically, the affix flags can be used for:- Suffixes on suffixes,as in the example above. This works once, thus you can have twosuffixes onaword (plus one prefix).- Making theword with the affix rare, by using thespell-RARE flag.- Exclude theword with the affix from compounding, by using thespell-COMPOUNDFORBIDFLAG flag.- Allow theword with the affix to be part ofa compoundword on the side of the affix with thespell-COMPOUNDPERMITFLAG.- Use the NEEDCOMPOUND flag:word plus affix can only be usedas part ofa compound word.spell-NEEDCOMPOUND- Compound flags:word plus affix can be part ofa compoundwordat the end, middle, start, etc. The flags are combined with the flags of the basic word.spell-compound- NEEDAFFIX: another affixis needed to makea valid word.- CIRCUMFIX,as explained just below.IGNOREEXTRAspell-IGNOREEXTRANormally Vim gives an error for an extra field that does not start with '#'.This avoidserrors going unnoticed. However, some files created forMyspellor Hunspell may contain many entries with an extra field. Use the IGNOREEXTRAflag to avoid lots of errors.CIRCUMFIXspell-CIRCUMFIXThe CIRCUMFIX flag meansa prefix and suffixmust be addedat the same time.Ifa prefix has the CIRCUMFIX flag then onlysuffixes with the CIRCUMFIX flagcan be added, and the other way around.An alternativeis to only specify the suffix, and give that suffix two flags:the required prefix and the NEEDAFFIX flag.spell-NEEDAFFIXPFXPOSTPONEspell-PFXPOSTPONEWhen an affix file has very many prefixes that apply to many words it's notpossible to build the wholewordlist in memory. This applies to Hebrew (alist with all wordsis overa Gbyte). In thatcase applying prefixesmust bepostponed. This makesspell checking slower. Itis indicated by this keywordin the.aff file:PFXPOSTPONEOnly prefixes withouta chopstring and without flags can be postponed.Prefixes witha chopstring or with flags will still be included in thewordlist. An exception if the chopstringis one character and equal to the lastcharacter of the added string, but in lower case. Thus when the chopstringis used to allow the followingword to start with an uppercase letter.WORDS WITH A SLASHspell-SLASHThe slashis used in the.dic file to separate the basicword from the affixletters and other flags. Unfortunately, this means you cannot usea slash ina word. Thus "TCP/IP"is notaword but "TCP" with the flags "IP". To includea slash in thewordputabackslash before it: "TCP\/IP". In the rarecaseyou want to useabackslash insideaword you need to use two backslashes.Any other use of thebackslashis reserved for future expansion.KEEP-CASE WORDSspell-KEEPCASEIn the affix filea KEEPCASE line can be used to define the affix name usedfor keep-case words. Example:KEEPCASE =This flagis not supported by Myspell. It has the meaning thatcase matters.This can be used if theword does not have the firstletter in uppercaseatthe start ofa sentence. Example: word list matches does not match 's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS 's Morgens 's Morgens 'S MORGENS 'S morgens 's morgensThe flag can also be used to avoid that theword matches whenitis in allupper-case letters.RARE WORDSspell-RAREIn the affix filea RARE line can be used to define the affix name used forrare words. Example:RARE ?Rare words are highlighted differently from bad words. Thisis to be used forwords that are correct for the language, but are hardly ever used and could bea typing mistake anyway. When the samewordis foundas goodit won't behighlightedas rare.This flag can also be used on an affix, so thata basicwordis not rare butthe basicword plus affixis rarespell-affix-flags. However, if thewordalso appearsasa goodword in another way (e.g., in another region)it won'tbe markedas rare.BAD WORDSspell-BADIn the affix filea BAD line can be used to define the affix name used forbad words. Example:BAD !This can be used to exclude words that would otherwise be good. For example"the the" in the.dic file:the the/!Onceaword has been markedas badit won't be undone by encountering the samewordas good.The flag also applies to theword with affixes, thus this can be used tomarka whole bunch of related wordsas bad.spell-FORBIDDENWORDFORBIDDENWORD can be used just like BAD. For compatibility with Hunspell.spell-NEEDAFFIXThe NEEDAFFIX flagis used to require thatawordis used with an affix. Theword itselfis nota goodword (unless thereis an empty affix). Example:NEEDAFFIX +COMPOUND WORDSspell-compoundA compoundwordisa longerword made by concatenating words that appear inthe.dic file. To specify which words may be concatenateda characterisused. This characterisput in thelist of affixes after the word. We willcall this charactera flag here. Obviously these flagsmust be different fromany affix IDs used.spell-COMPOUNDFLAGTheMyspell compatiblemethod uses one flag, specified with COMPOUNDFLAG. Allwords with this flag combine in any order. This means thereis nocontrolover whichword comes first. Example:COMPOUNDFLAG cspell-COMPOUNDRULEA more advancedmethod to specify how compound words can be formed usesmultiple items with multiple flags. Thisis not compatible withMyspell 3.0.Let's start with an example:COMPOUNDRULE c+COMPOUNDRULE seThe first line defines that words with the "c" flag can be concatenated in anyorder. The second line defines compound words that are made of oneword withthe "s" flag and oneword with the "e" flag. With this dictionary:bork/conion/ssoup/eYou can make these words:borkborkborkborkborkbork(etc.)onionsouponionsoupThe COMPOUNDRULE item may appear multiple times. The argumentis made out ofone or more groups, where each group can be:one flage.g.,calternate flags inside[]e.g.,[abc]Optionally this may be followed by:*the group appears zero or more times, e.g., sm*e+the group appears one or more times, e.g., c+?the group appears zero times or once, e.g., x?Thisis similar to theregexppatternsyntax (but not the same!).A fewexamples with the sequence ofword flags they require: COMPOUNDRULE x+x xx xxx etc. COMPOUNDRULE yz yz COMPOUNDRULE x+z xz xxz xxxz etc. COMPOUNDRULE yx+ yx yxx yxxx etc. COMPOUNDRULE xy?z xz xyz COMPOUNDRULE[abc]z az bz cz COMPOUNDRULE[abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc. COMPOUNDRULE a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc. COMPOUNDRULE sm*e se sme smme smmme etc. COMPOUNDRULE s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc.A specific example: Allowa compound to be made of two words anda dash:In the.aff file: COMPOUNDRULE sde NEEDAFFIX x COMPOUNDWORDMAX 3 COMPOUNDMIN 1In the.dic file: start/s end/e -/xdThis allows for theword "start-end", but not "startend".An additional implied ruleis that, without further flags,aword withaprefix cannot be compounded after another word, andaword witha suffixcannot be compounded witha following word. Thus the affix cannot appearon the inside ofa compound word. This can be changed with thespell-COMPOUNDPERMITFLAG.spell-NEEDCOMPOUNDThe NEEDCOMPOUND flagis used to require thatawordis usedas part ofacompound word. Theword itselfis nota good word. Example:NEEDCOMPOUND &spell-ONLYINCOMPOUNDThe ONLYINCOMPOUND does exactly the sameas NEEDCOMPOUND. Supported forcompatibility with Hunspell.spell-COMPOUNDMINThe minimal character length ofaword used for compoundingis specified withCOMPOUNDMIN. Example:COMPOUNDMIN 5When omitted thereis no minimal length. Obviously you could just leave outthe compound flag from short words instead, this featureis present forcompatibility with Myspell.spell-COMPOUNDWORDMAXThe maximum number of words that can be concatenated intoa compoundwordisspecified with COMPOUNDWORDMAX. Example:COMPOUNDWORDMAX 3When omitted thereis no maximum. It applies to all compound words.To seta limit for words with specific flags make sure the items inCOMPOUNDRULE where they appear don't allow too many words.spell-COMPOUNDSYLMAXThe maximum number of syllables thata compoundword may containis specifiedwith COMPOUNDSYLMAX. Example:COMPOUNDSYLMAX 6This has no effect if thereis no SYLLABLE item. Without COMPOUNDSYLMAX thereis no limit on the number of syllables.If both COMPOUNDWORDMAX and COMPOUNDSYLMAX are defined,a compoundwordisaccepted ifit fits one of the criteria, thusis either made from up toCOMPOUNDWORDMAX words or contains up to COMPOUNDSYLMAX syllables.spell-COMPOUNDFORBIDFLAGThe COMPOUNDFORBIDFLAGspecifiesa flag that can be used on an affix. Itmeans that theword plus affix cannot be used ina compound word. Example:affix file:COMPOUNDFLAG cCOMPOUNDFORBIDFLAG xSFX a Y 2SFX a 0 s .SFX a 0 ize/x .dictionary:word/cutil/acThis allows for "wordutil" and "wordutils" but not "wordutilize".Note: this doesn't work for postponed prefixes yet.spell-COMPOUNDPERMITFLAGThe COMPOUNDPERMITFLAGspecifiesa flag that can be used on an affix. Itmeans that theword plus affix can also be used ina compoundword ina waywhere the affix ends up halfway the word. Without this flag thatis notallowed.Note: this doesn't work for postponed prefixes yet.spell-COMPOUNDROOTThe COMPOUNDROOT flagis used for words in the dictionary that are alreadyacompound. This meansit counts for two words when checking the compoundingrules. Can also be used for an affix tocount the affixasa compoundingword.spell-CHECKCOMPOUNDPATTERNCHECKCOMPOUNDPATTERNis used to define patterns that, when matchingat theposition where two words are compounded together forbids the compound.For example:CHECKCOMPOUNDPATTERN o eThis forbids compounding if the firstword ends in "o" and the secondwordstarts with "e".The argumentsmust be plain text, no patterns are actually supported, despitethe item name. Caseis always ignored.The Hunspell feature to use three arguments and flagsis not supported.spell-NOCOMPOUNDSUGSThis item indicates that using compounding to make suggestionsis nota goodidea. Use this when compoundingis used with very short or one-characterwords. E.g. to make numbers out of digits. Without this flag creatingsuggestions would spend most time trying all kind of weird compound words.NOCOMPOUNDSUGSspell-SYLLABLEThe SYLLABLE item defines characters or character sequences that are used tocount the number of syllables ina word. Example:SYLLABLE aáeéiíoóöõuúüûy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/uiBefore the first slashis the set of characters that are counted for onesyllable, also when repeated and mixed, until the next character thatis notin this set. After the slash come sequences of characters that are countedfor 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 thespell-COMPOUNDFORBIDFLAG flag to an affix causes all words that are madewith that affix to not be used for compounding.UNLIMITED COMPOUNDINGspell-NOBREAKFor some languages, suchas Thai, thereis nospace in between words. Thislooks like all words are compounded. To specify this use the NOBREAK item inthe affix file, without arguments:NOBREAKVim will try to figure out where oneword ends anda next starts. When thereare spelling mistakes this may not be quite right.spell-COMMONCommon words can be specified with the COMMON item. This will give bettersuggestions when editinga short file. Example:COMMON the of to and a in is it you that he she was for on areThe wordsmust be separated by white space, up to 25 per line.When multiple regions are specified ina ":mkspell" command the common wordsfor all regions are combined and used for all regions.spell-NOSPLITSUGSThis item indicates that splittingaword to make suggestionsis nota goodidea. Split-word suggestions will appear only when there are few similarwords.NOSPLITSUGSspell-NOSUGGESTThe flag specified with NOSUGGEST can be used for words that will not besuggested. Can be used for obscene words.NOSUGGEST %REPLACEMENTSspell-REPIn the affix file REP items can be used to define common mistakes. Thisisused to make spelling suggestions. The items define the "from" text and the"to" replacement. Example:REP 4REP f phREP ph fREP k chREP ch kThe first linespecifies the number of REP lines following. Vim ignores thenumber, butitmust be there (for compatibility with Myspell).Don't include simple one-character replacements or swaps. Vim will try theseanyway. You can include whole words if you want to, but you might want to usethe "file:" item in'spellsuggest' instead.You can includeaspace by using an underscore:REP the_the theSIMILAR CHARACTERSspell-MAPE783In the affix file MAP items can be used to define letters that are very muchalike. Thisis mostly used foraletter with different accents. Thisis usedto prefer suggestions with these letters substituted. Example:MAP 2MAP eéëêèMAP uüùúûThe first linespecifies the number of MAP lines following. Vim ignores thenumber, but the linemust be there.Eachlettermust appear in only one of the MAP items. It'sa bit moreefficient if the firstletteris ASCII orat least one without accents..SUG FILEspell-NOSUGFILEWhen soundfoldingis specified in the affix file then ":mkspell" will normallyproducea .sug file next to the .spl file. This fileis used to findsuggestions by their sound-a-like form quickly. At the cost ofa lot ofmemory (the amount depends on the number of words,:mkspell will display anestimate when it's done).To avoid producinga .sug file use this item in the affix file:NOSUGFILEUsers can simply omit the .sug file if they don't want to use it.SOUND-A-LIKEspell-SALIn the affix file SAL items can be used to define the sounds-a-like mechanismto be used. The main items define the "from" text and the "to" replacement.Simplistic example:SAL CIA XSAL CH XSAL C KSAL K KThere area few rules and this can become quite complicated. An explanationhowit works can be found in the Aspell manual:http://aspell.net/man-html/Phonetic-Code.html.There area few special items:SAL followuptrueSAL collapse_resulttrueSAL remove_accentstrue"1" has the same meaningas "true". Any other value means "false".SIMPLE SOUNDFOLDINGspell-SOFOFROMspell-SOFOTOThe SAL mechanismis complex and slow.A simpler mechanismismapping allcharacters to another character,mapping similar sounding characters to thesame character. At the same time this doescase folding. You can not haveboth SAL items and simple soundfolding.There are two items required: one to specify the characters that are mappedand one thatspecifies the characters they are mapped to. Theymust haveexactly the same number of characters. Example: SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkesIn the example all vowels are mapped to the same character 'e'. Anothermethod would be to leave out all vowels. Some characters that sound nearlythe same and are often mixed up, suchas 'm' and 'n', are mapped to the samecharacter. Don'tdo this too much, all words will start looking alike.Characters thatdo not appear in SOFOFROM will be left out, except that allwhitespaceis replaced by one space. Sequences of the same character inSOFOFROM are replaced by one.You can use thesoundfold() function to try out the results. Or set the'verbose' option to see the score in the output of thez= command.UNSUPPORTED ITEMSspell-affix-not-supportedThese items appear in the affix file of otherspell checkers. In Vim they areignored, not supported or defined in another way.ACCENT(Hunspell)spell-ACCENTUse MAP instead.spell-MAPBREAK(Hunspell)spell-BREAKDefine break points. Unclear howit works exactly.Not supported.CHECKCOMPOUNDCASE (Hunspell)spell-CHECKCOMPOUNDCASEDisallowuppercase lettersat compoundword boundaries.Not supported.CHECKCOMPOUNDDUP (Hunspell)spell-CHECKCOMPOUNDDUPDisallow using the sameword twice ina compound. Notsupported.CHECKCOMPOUNDREP (Hunspell)spell-CHECKCOMPOUNDREPSomething about using REP items and compound words. Notsupported.CHECKCOMPOUNDTRIPLE (Hunspell)spell-CHECKCOMPOUNDTRIPLEForbid three identical characters when compounding. Notsupported.CHECKSHARPS (Hunspell)spell-CHECKSHARPSSSletter pair in uppercased (German) words may be uppercasesharps (ß). Not supported.COMPLEXPREFIXES (Hunspell)spell-COMPLEXPREFIXESEnables using two prefixes. Not supported.COMPOUND(Hunspell)spell-COMPOUNDThisis one line with thecount of COMPOUND items, followed bythat many COMPOUND lines witha pattern.Remove the first line with thecount and rename the otheritems to COMPOUNDRULEspell-COMPOUNDRULECOMPOUNDFIRST(Hunspell)spell-COMPOUNDFIRSTUse COMPOUNDRULE instead.spell-COMPOUNDRULECOMPOUNDBEGIN(Hunspell)spell-COMPOUNDBEGINWords signed with COMPOUNDBEGIN may be first elements incompound words.Use COMPOUNDRULE instead.spell-COMPOUNDRULECOMPOUNDLAST(Hunspell)spell-COMPOUNDLASTWords signed with COMPOUNDLAST may be last elements incompound words.Use COMPOUNDRULE instead.spell-COMPOUNDRULECOMPOUNDEND(Hunspell)spell-COMPOUNDENDProbably the sameas COMPOUNDLASTCOMPOUNDMIDDLE(Hunspell)spell-COMPOUNDMIDDLEWords signed with COMPOUNDMIDDLE may be middle elements incompound words.Use COMPOUNDRULE instead.spell-COMPOUNDRULECOMPOUNDRULES(Hunspell)spell-COMPOUNDRULESNumber of COMPOUNDRULE lines following. Ignored, but theargumentmust bea number.COMPOUNDSYLLABLE (Hunspell)spell-COMPOUNDSYLLABLEUse SYLLABLE and COMPOUNDSYLMAX instead.spell-SYLLABLEspell-COMPOUNDSYLMAXKEY(Hunspell)spell-KEYDefine characters that are close together on the keyboard.Used to give better suggestions. Not supported.LANG(Hunspell)spell-LANGThisspecifies language-specific behavior. This actuallymoves part of the language knowledge into the program,therefore Vim does not support it. Each language propertymust be specified separately.LEMMA_PRESENT(Hunspell)spell-LEMMA_PRESENTOnly needed for morphological analysis.MAXNGRAMSUGS(Hunspell)spell-MAXNGRAMSUGSSet number of n-gram suggestions. Not supported.PSEUDOROOT(Hunspell)spell-PSEUDOROOTUse NEEDAFFIX instead.spell-NEEDAFFIXSUGSWITHDOTS(Hunspell)spell-SUGSWITHDOTSAdds dots to suggestions. Vim doesn't need this.SYLLABLENUM(Hunspell)spell-SYLLABLENUMNot supported.TRY(Myspell, Hunspell, others)spell-TRYVim does not use the TRY item,itis ignored. For makingsuggestions the actual characters in the words are used, thatis much more efficient.WORDCHARS(Hunspell)spell-WORDCHARSUsed to recognize words. Vim doesn't need it, because thereis no need to separate words before checking them (usingatrie instead ofa hashtable). vim:tw=78:sw=4:ts=8:noet:ft=help:norl: