Friday, June 18, 2010

Re: set filetype in .vimrc

Tony Mechelynck-2 wrote:
>
> Most Vim helpfiles have a modeline at the end, something like
>
> vim:tw=78:ts=8:ft=help:norl:
>
> (see :help modeline)
>
> The :ft=help: part in such a modeline (intentionally) overrides any
> filetype which might have been set by the filetype-detection mechanism.
> Normally you wouldn't want to override such modelines, they're there for
> good reason. (For instance I have an own-coded rule to identify *.txt
> files as filetype "text", but thanks to these modelines it doesn't apply
> to the Vim help.)
>
>

I removed the modeline, and still defaults back to help filetype, and the
weird thing is that if i remove the 'syntax enable' and 'filetype on'
commands from the .vimrc the filetype would be to whatever i manually set in
the autocommand, but these SAME two commands don't overrule a buffer
filetype after it has been already set.

does 'filetype on' command behave differently from the .vimrc vs. the
command line?

thanks so much
alex
--
View this message in context: http://old.nabble.com/set-filetype-in-.vimrc-tp28931594p28931767.html
Sent from the Vim - General mailing list archive at Nabble.com.

--
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: