
Then use that file by specifying it in spelllang. spl files using the command :mkspell outfile infile. aff files used in many other packages can be converted into vim. Finally, you can use your own spell file.The entries here must have two columns separated by slash. If this file is the first entry (like set spellsuggest=file:~/.vim/sugg,best) then your suggestions will be shown first. The variable spellsuggest determines which will be used first. You can add your own suggestions for commonly misspelled words in a local file (for example.After you make a correction with z= you can use :spellrepall command to apply the same change to all words that match (may want to map it some key in normal mode). This is helpful when you don't know the spelling and so type it halfway to load the suggestions list. Apart from z= command to load spell suggestions one can also use Ctrl + x s in insert mode to load spell suggestions.However, these are NOT persistent and are lost when Vim exits. The commands zG and zW stores the words in internal wordlist which is global for all the buffer where spell is set. These are local to the buffer since spellfile is buffer-local. Using the commands zg and zw stores them in the first entry in spellfile. There are two locations where words you add are stored.The ]s and S and [S only for the first two categories. Each of these is highlighted differently. These are: a) words not recognized (SpellBad) b) words not capitalized (SpellCap) c) Rare words (SpellRare) and d) Wrong spelling for selected region (SpellLocal) for example using "colour" with US English. Vim recognizes mainly four types of spelling "errors".

These are binary files and have the form LL.EEE.spl where LL is the language (such as en for English) and EEE is the encoding (utf-8 for example). vim/spell directory this is typically somewhere like /usr/share/vim/vim81/spell for example. The locations in runtimepath are searched in the order they appear and is stopped at the first search. spelllang specifies which spell file Vim will look at (also determined by spellfile option).It is a window local option so if it is desired to only enable it for a specific buffer use :setlocal spell spelllang=en_us instead for example. The boolean option spell determines whether spell checking is enabled or not.Find and correct spelling mistakes, typos.Enable Spell Check Feature In Vim Editor.
