Spellcheck Certain Filetypes
I don't like misspellings in my documentation, yet make a lot of them. Spelling is disabled in all my buffers by default; I turn it on when reading or editing docs. When I forget to do so, it's easy to miss typos.
While reading Learn VimScript The Hard Way I figured out a better solution to this problem. This now lives in my
augroup spellcheck_documentation autocmd BufNewFile,BufRead *.md setlocal spell autocmd BufNewFile,BufRead *.rdoc setlocal spell augroup END
Anytime a markdown or RDoc file is created or read, I set a local configuration to turn spelling on. This has already proved invaluable after only a day or two.Tweet