Thursday, July 1, 2010

Re: enable spell for a particular set of files

On Jo, 01 iul 10, 13:35:58, Xian Chen wrote:
> I want to enable spell for .txt and .tex files. Is there any way to do so?
>
> I enable spell in .vimrc but it enables for every file, including .c .cpp.

You can do just any setting per filetype with an 'autocmd'. Something
like this in .vimrc should work

autocmd FileType txt set spell spelllang=en

Use
:help autocmd
to get more info.

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

No comments:

Post a Comment