You are not logged in.
I've searched around and I'm having a hard time figuring out how to do this. I can globally enable the spellchecking in .vimrc, and I think I saw that I can set a Fn Key to toggle spellcheck, but is there a way to automatically enable it for certain filetypes: e.g. txt, t2t (text2tags), mutt email compose (not sure what filetype that uses), etc?
Thanks!
Scott
Last edited by firecat53 (2008-11-21 19:51:18)
Offline
Something like this in your .vimrc should do the trick...tweak it for whatever filetypes you need:
if has("autocmd")
autocmd BufRead *.txt set spell
autocmd BufRead /tmp/mutt-* set tw=72 ft=mail nocindent spell " width, mail syntax hilight, spellcheck
endif
Last edited by thayer (2008-11-21 06:33:13)
thayer williams ~ cinderwick.ca
Offline
:h autocmd
3 different ways below:
au BufNewFile,BufRead *.txt setlocal spell
au Syntax text2tags setlocal spell
au FileType mail setlocal spell
They should all do the same thing, it depends on how you want to specify it. Personally, I would use FileType for everything.
Edit: Damn you thayer!
Offline