47
votes
Accepted
Vim cannot find medical spell files
The "medical" spell file does not exist, it is just an example of a name that is longer than two characters. You would have to generate one yourself.
32
votes
Remove word from dictionary
To remove a word, try zuw and/or zug
I've tried cmd + fing the spell man page for "remove word" but found nothing.
For a cmd+f search, I have had more success searching only on "remove" :-)
If ...
26
votes
Vim cannot find medical spell files
In response to Bram's answer, I have found, modified, and compiled a medical spell file that can be used with Vim.
I've made the full instructions and the source code available under a GPL3 license ...
24
votes
Accepted
How to enable spell check for certain file types?
The best way to set an option for a particular filetype is to use autocommands.
Here you could add something like that in your .vimrc:
autocmd FileType markdown setlocal spell
This line will ...
24
votes
Accepted
How can I undo `zg`?
From the help
zuw *zug* *zuw*
zug Undo |zw| and |zg|, remove the word from the entry in
'spellfile'. Count used as with |zg|.
zuW ...
19
votes
Accepted
How to share Vim spellchecking additions between multiple machines?
Vim uses the spl file to do the checks, and the spl file is generated from the add file. We can speculate on whether the spl file is portable across different machines and Vim versions, but it's ...
16
votes
Accepted
How can I make vim download spell files?
The help states this:
The plugin has a default place where to look for spell files, on the Vim ftp
server. If you want to use another location or another protocol, set the
g:spellfile_URL variable ...
13
votes
Accepted
Spell mistakes have weird coloring
The SpellBad highlighting group should allow you to configure the appearance of misspelled words.
Let's say you want them to be red on yellow background. Then you could add the following code ...
12
votes
Accepted
Change color of misspelled words in vim-lexical
The repository says it uses Vim's spellcheck, so you should be able edit your color file's SpellBad highlighting to do this. Something like:
hi SpellBad ctermfg=red guifg=red
You could also put ...
12
votes
Accepted
How can I use multiple spell files at the same time?
Vim finds the file you're referring to as the "master" file by searching for files with a particular naming scheme in the spell subdirectory within the paths specified by your runtimepath. (See :help ...
11
votes
Accepted
vim shortcut for ignore spell-checked word
Use zG. From :help zG
*zG*
zG Like "zg" but add the word to the internal word list
|internal-wordlist|.
and from :help internal-wordlist
...
11
votes
Accepted
What is the difference between red and cyan in spell check highlighting?
If your highlighting is like mine then that would be a SpellLocal error.
SpellLocal Word that is recognized by the spellchecker as one that is used in another region.
And...
A word may be ...
10
votes
How to set a colorscheme that still shows spelling errors?
Here is a bit more complete answer to address this annoyance:
" Force to use underline for spell check results
augroup SpellUnderline
autocmd!
autocmd ColorScheme *
\ highlight SpellBad
\ ...
10
votes
Accepted
How can I make Vim not use the entire screen for spelling suggestions?
There is the 'spellsuggest' option for this, which controls various options for the spelling suggestion. You can add a limit by appending a number (note the +=):
set spellsuggest+=10
Which limits ...
8
votes
Accepted
Converting .spl spell files
Yes, you can use :spelldump.
:spelld[ump] Open a new window and fill it with all currently valid
words. Compound words are not included.
...
8
votes
Accepted
How to set a colorscheme that still shows spelling errors?
I'm going to take a stab in the dark and suggest that your configuration is probably resulting in no highlighting.
You can check this with the command :verbose highlight SpellBad: if the xxx at the ...
7
votes
Is it possible to turn on spell-checking for only parts of buffers?
You can define syntax rule with the @NoSpell keyword. From :help :syn-spell
:sy[ntax] spell [toplevel | notoplevel | default]
This defines where spell checking is to be done for text that is ...
7
votes
Autocorrect spelling mistakes
By chance, I have written a plugin that does exactly this. It is called Vim You, Autocorrect!
After installing, type :EnableAutocorrect to switch it on in any buffer, and you will soon see that ...
7
votes
Accepted
Ignore capital letter rule when word is preceded by a shortcut
I found the solution. You need to add the shortcut to the dictionary, including the dot. So I expect that in case of en_gb the word e.g. is included in the default dictionary.
The problem is, you ...
7
votes
Disable spell checking for URLs in BibTeX
For the URLs, I have the pattern \w\+:\/\/[^[:space:]]\+, but I cannot figure out what to put in containedin. The best I came up with is containedin=bibQuote,bibBrace, that works but it breaks syntax ...
7
votes
Accepted
Why does "thge" correct to "Chge" using spellcheck?
chge is an abbreviation of "change."
If you do not like this word, just type zw to mark it as "wrong."
vim's spell word lists are obtained from free sources and are sometimes not ...
6
votes
How to configure spell to ignore some environments in LaTeX
You can add your own syntax rules to e.g. ~/.vim/after/syntax/tex.vim. In order to prevent spell checking inside a command such as \url, you can use the following code:
syntax match texStatement '\\...
6
votes
How to share Vim spellchecking additions between multiple machines?
I've created a Vim plugin for this. It finds the path to the spell folders automatically and then calls mkspell on any word lists it finds at startup to regenerate the spell files. It also creates ....
6
votes
Accepted
Is there a function that says whether a word is good or bad?
You can use the spellbadword function:
spellbadword([{sentence}])
...
With argument: The result is the first word in {sentence} that
is badly spelled. If there are no spelling mistakes ...
6
votes
Accepted
How do I allow sentences to begin with lowercase letters?
There's the 'spellcapcheck' option; from the help:
Pattern to locate the end of a sentence. The following word will be checked to start with a capital letter. If not then it is highlighted with ...
6
votes
Accepted
Command to loop through spelling suggestions
Here's what I came up with:
Spell Rotate
Features
The '[ and '] marks are used to keep track of the text being worked on. Making a change elsewhere will effectively "accept" the suggested change.
...
6
votes
Change spellcheck language via syntax
I answered pretty much the same question on Stack Overflow last week, and the short of it is that you can't do this.
The best you can do is to use :set spelllang=en_gb,tr, so it checks both languages....
6
votes
Accepted
How does .sug files work, and can you generate them yourself?
The first hint as to the purpose of these files is :h spell-sug-file:
This file is used
to find suggestions by their sound-a-like form quickly. At the cost
of a lot of memory
There are three ...
6
votes
Accepted
Using `TabEnter` and `FileType` in the same `autocmd`
Frame Challenge : Using Vim "Properly"1
autocmd is NOT the solution to filetype-dependent settings. It might seem like a good candidate at first, but Vim was built after the Unix philosophy of ...
6
votes
Accepted
How to make spell check work for text inside a XML file?
Spellchecking inside tags has been requested some time ago (and apparently was a long outstanding Debian wishlist bug) and was enabled in the vim-xml syntax file since this commit. Just clone the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
spell-checking × 145syntax-highlighting × 15
vimrc × 13
neovim × 11
spelling × 10
filetype-tex × 8
highlight × 7
vimscript × 4
key-bindings × 4
filetype-markdown × 4
linux × 3
regular-expression × 2
search × 2
gvim × 2
autocmd × 2
colorscheme × 2
microsoft-windows × 2
functions × 2
cursor-motions × 2
netrw × 2
plugin-vimtex × 2
sessions × 2
filetype-xml × 2
dictionary × 2
command-line × 1