Friday, February 4, 2011

Re: Setting filetype with autocommand

On 2011-02-05 Jan Larres <lists@majutsushi.net> wrote:

> >>> au BufRead, BufNewFile *.tex set filetype=context
> >>>
> >>> but I got the same result, still plaintex.
> >>
> >> You should have no space after your comma.
> >
> > Yes, that's it. Thanks
>
> A better solution is to set g:tex_flavor, see :h ft-tex-plugin.

To be honest, I already use it for tex files. But my autocommands for other
filetypes that can be simply set via looking at the file name also didn't
work. So I wanted to fix my autocommands line. Setting g:tex_flavor was just a
workaround to bypass my errors in the autocommand line.

Anyway, thanks for the hint.


Regards
Marco


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: