Questions tagged [spell-checking]

A feature that identifies and highlights misspelled words, and lets you choose among possible correct replacements.

Inline spell-checking is available in Vim since version 7. It can be turned on with the command:

:set spell spelllang=en_us

where en_us is the name of the dictionary to use as reference. While it is running, it will highlight words using four different colors:

SpellBad    word not recognized                 |hl-SpellBad|
SpellCap    word not capitalised                |hl-SpellCap|
SpellRare   rare word                           |hl-SpellRare|
SpellLocal  wrong spelling for selected region  |hl-SpellLocal|

After moving the cursor on a misspelled word, z= can be used to get a list of replacement candidates. If the word is highlighted as misspelled, but you still think it is correct, you can add it to the dictionary instead, using zg.

To turn the feature off, use:

:set nospell

Full documentation: spell vimdoc

145 questions
24
votes
1 answer

Remove word from dictionary

I'm using gvim: $ gvim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 16 2017 06:36:51) MacOS X (unix) version Included patches: 1-329 Compiled by Homebrew I was editing the following line of text: enable mouse scrolling, pane…
mbigras
  • 637
  • 6
  • 11
22
votes
2 answers

Autocorrect spelling mistakes

I've turned on spellcheck with :set spell spelllang=en_us I can now correct the spelling of a word by typing 1z= (that is, choose the 1st spelling correction (z=)). How can I make this automatically run on the previous word whenever I type a space,…
Doorknob
  • 15,237
  • 3
  • 48
  • 70
20
votes
2 answers

How can I make vim download spell files?

When setting spelllang for the first time, I was prompted to auto-download the appropriate spell file. Somehow I aborted the process due to unclear instructions, when it asked me, into which directory it should go. Now when I :set spelllang it just…
oarfish
  • 1,277
  • 3
  • 10
  • 18
17
votes
1 answer

How can I have Vim sound the terminal bell when I misspell a word?

I do a fair amount of transcription in which I type at 100+ wpm without looking at the screen. I think it would be useful if Vim could give me some sort of audible cue if the spell-checker has just marked the last word (likely indicating that I made…
Soren Bjornstad
  • 504
  • 2
  • 11
16
votes
2 answers

How can I use Vim's spellcheck with ‘smart quotes’?

There are the "normal" straight quotes: ' " And you have the angled "smart quotes": ‘ ’ “ ” Vim's spellcheck works with "straight" quotes, but not angeled quotes, so this is considered "wrong": It’s ... Monty Python’s Even though it's…
Martin Tournoij
  • 62,054
  • 25
  • 192
  • 271
14
votes
3 answers

How can I make the spellcheck selection window allow me to type my own correction?

When doing spell checking, keying z=, brings up a selection list, as shown bellow. As you can see the correct spelling; "i.e." is not shown as any of the options. I would like to enhance this menu, so that I can instead just type in "i.e." and…
14
votes
3 answers

How to share Vim spellchecking additions between multiple machines?

I use Vim's spellchecking feature. Given that I work with many technical terms and LaTeX commands, I tend to add many them to my personal dictionary in ~/.vim/spell/en.utf-8.add. I would like to share this file across multiple machines, so that when…
a3nm
  • 435
  • 3
  • 10
8
votes
1 answer

How do I mark a word as rare?

Vim has the commands zg and zw to mark a word as good (correctly spelled) or bad (incorrectly spelled), respectively. Is there a similar command to mark a word as rarely-used? (It’s possible to manually append the word plus /? to the spell file, but…
bdesham
  • 2,983
  • 2
  • 18
  • 20
7
votes
1 answer

How do I allow sentences to begin with lowercase letters?

My spellchecker wants me to begin every sentence with a capital letter, i.e., it underlines lowercase characters after full stop. Can I make it stop?
Toothrot
  • 3,129
  • 13
  • 27
7
votes
1 answer

Adding words to one of many spellfiles

Say I am mixing English and German in my documents and have my spelllang variable set accordingly. How do I indicate, when I want to mark a word as good, to which spellfile it is to be added?
Toothrot
  • 3,129
  • 13
  • 27
7
votes
1 answer

Converting .spl spell files

VIM spell files seem to be in some binary format. Is it possible (and easy) to convert one back to a plain text word list?
Toothrot
  • 3,129
  • 13
  • 27
7
votes
1 answer

How can I spell check an entire buffer?

Is there a built-in command or plugin available to trigger spell checking over the entire current buffer, prompting me for each word it detects to either ignore, add to dictionary, or correct spelling? I've been using ]s to skip through spelling…
Mu Mind
  • 485
  • 3
  • 10
7
votes
1 answer

Ignore capital letter rule when word is preceded by a shortcut

I want to use the spelling rule: begin first word in a sentence with capital letter, but Vim faultily recognises the end of a sentence when I use shortcuts that end with a dot. The problem exists only with my native language. When using en_gb this…
nuoritoveri
  • 241
  • 1
  • 4
6
votes
1 answer

vim shortcut for ignore spell-checked word

In Gvim there is an option upon rightclicking a highlighted word to ignore all such words. What is the shortcut for that?
atapaka
  • 163
  • 4
6
votes
1 answer

Correct all spelling mistakes in the document

I've turned on spellcheck with :set spell spelllang=en_us. Now there's a bunch of words highlighted in red, and I just want to correct them all to their closest matches. How can I correct all misspelled words in the entire file?
Doorknob
  • 15,237
  • 3
  • 48
  • 70
1
2 3 4 5