15532Re: when is filetype set?
- Jan 3, 2001"Michael P. Soulier" wrote:
>Does this work? I do not think it should. IIRC, the standard Syntax
> On Wed, Jan 03, 2001 at 03:10:54PM +0530, Janakiraman .S wrote:
> > I dont think so. You will need to execute this each time you load a
> > buffer.
> > Also syn off turns syntax highlighting off on all buffers.
> > syn clear will clear it for the current buffer alone.
> > I suggest using autocommands to achieve what you want.
> > Something like
> > " Set up your defaults for all files
> > syn on
> > au FileType * se cindent nu
> > " Specific to files of filetype mail
> > au FileType mail syn clear
> > au FileType mail se tw=78 noai
> Ok, I had to tweak this a bit because it was conflicting with other
> settings, but I believe it's finally working.
> Thanks for your help, and I'll read up the docs again. ;-)
autocommands are defined after the vimrc file is sourced. Since
autocommands are executed in the order they are defined, I do not think
yours will have any effect. Maybe if you put it in the gvimrc instead of
There is a way to customize syntax highlighting. It will be
different (and easier) in vim 6.0. If you are planning to RTFM, I suggest
the following topics:
HTH --Benji Fisher
- << Previous post in topic Next post in topic >>