Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to spell check a file using vim?

share|improve this question
up vote 8 down vote accepted

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.

share|improve this answer
Also, you can add the :set spell in ~/.vimrc file, so that it will be effective for all the file. – SHW May 9 '11 at 15:04

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>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.