Is there a way to spell check a file using vim?
Asked
Active
Viewed 2,833 times
2 Answers
13
If you have a spell checker installed on your system, vim will usually find it. If not you will need to install ispell, aspell, hunspell or a similar system as well as support files for the language you want to check.
:set spell
Here is an answer on StackOverflow with keybindings and also a quick little tutorial for usage.
-
Also, you can add the `:set spell` in ~/.vimrc file, so that it will be effective for all the file. – SHW May 09 '11 at 15:04
-
`quick little tutorial` link is dead at the time of writing. – Herpes Free Engineer May 17 '18 at 14:14
7
If you want to toggle spellcheck on and off, you can add something like the following to your .vimrc:
map <F4> :setlocal spell spelllang=en_gb<CR>
map <F5> :set nospell<CR>
One Thing Well
- 101
- 3