Skip to main content
Share Your Experience: Take the 2024 Developer Survey
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.
Bram Moolenaar's user avatar
33 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 ...
StandardEyre's user avatar
  • 1,128
27 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 ...
D. Ben Knoble's user avatar
  • 26.4k
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 ...
melvio's user avatar
  • 617
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 ...
statox's user avatar
  • 50.1k
14 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 ...
Rich's user avatar
  • 32.1k
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 ...
Tumbler41's user avatar
  • 7,756
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 ...
DJMcMayhem's user avatar
  • 17.7k
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 ...
B Layer's user avatar
  • 19.9k
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 \ ...
Osamu Aoki's user avatar
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 ...
Martin Tournoij's user avatar
8 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 ...
nuoritoveri's user avatar
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 ...
Rich's user avatar
  • 32.1k
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 ...
Rich's user avatar
  • 32.1k
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 ...
filbranden's user avatar
  • 29k
7 votes
Accepted

Disabling spellchecker highlight

Do :filter Spell highlight to see the list of highlight groups related to spell checking. To disable highlighting for a group, for example SpellBad, do :highlight clear SpellBad
gdupras's user avatar
  • 186
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 ...
Mass's user avatar
  • 14.1k
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....
Martin Tournoij's user avatar
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. ...
Tommy A's user avatar
  • 6,790
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 ....
micarmst's user avatar
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 '\\...
Karl Yngve Lervåg's user avatar
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 ...
B Layer's user avatar
  • 19.9k
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 ...
D. Ben Knoble's user avatar
  • 26.4k
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 ...
Christian Brabandt's user avatar
6 votes
Accepted

Generate new spell file from .aff & .dic

The input can be the Myspell format files {inname}.aff and {inname}.dic. If {inname}.aff does not exist then {inname} is used as the file name of a plain word list. Omit aff ...
Matt's user avatar
  • 20.8k
5 votes

How can I make vim download spell files?

I understand the question differently: when answering "No" to the "Do you want me to try downloading it [the spell file]?" question, the option to download does not present itself again. I got around ...
Pedro Maciel's user avatar
5 votes

Ignore URLs and email addresses in spell file

Martin Tournoij's otherwise excellent answer fails to behave as expected for me – probably due to my leveraging diraol's phenomenal python-mode plugin rather than Vim's default syntax file for Python. ...
Cecil Curry's user avatar
5 votes

Command to loop through spelling suggestions

As @statox suggested, you can use the plugin I wrote: vimcorrect. I'll explain basically how it works, so if you want to reuse some part of it, you can. To focus on the next misspelled word I use ...
nobe4's user avatar
  • 16.1k
5 votes
Accepted

Exclude East Asian (CJK) characters from spell check

Have you tried :set spelllang+=cjk ? From :help 'spelllang': If the name "cjk" is included East Asian characters are excluded from spell checking. This is useful when editing text that also has ...
B Layer's user avatar
  • 19.9k
5 votes
Accepted

How to force vim spellchecker to ignore lowercase/uppercase errors

I don't think that Vim has a setting for this. One workaround is to create a new spellfile that contains everything in your current spell file(s) but with lowercase letters only: Create a new buffer ...
Rich's user avatar
  • 32.1k

Only top scored, non community-wiki answers of a minimum length are eligible