Monday, December 26, 2011

Re: why is Vim coloring text in txt files?

Tony Mechelynck wrote the following on 26.12.2011 10:10

Hello Tony,

-- <snip> --
>>> if exists("did_load_filetypes")
>>> finish
>>> endif
>>
>> Personly i would leave this out as i sometimes deliberately overwrite defaults
>
> So what? $VIMRUNTIME/filetype.vim sets its filetypes by :setfiletype,
> which does nothing if the filetype is already set. So you can override
> them by setting the filetype in ~/vimfiles/filetype.vim (for Windows) or
> ~/.vim/filetype.vim (for Unix) which is sourced immediately before
> $VIMRUNTIME/filetype.vim.
-- <snip> --

With the above snipped in '~/.vim/filetype.vim' overriding settings from
'$VIMRUNTIME/filetype.vim' will NEVER happen (even when setl is stronger then
setf) when '$VIMRUNTIME/filetype.vim' is sourced prior to '~/.vim/filetype.vim'.

But it occurred to me that vims default is to source '~/.vim/filetype.vim' prior
to '$VIMRUNTIME/filetype.vim' as you also mention above.

There are lots of ways to shot one self in the feet. Choose the one that suits
you best.

--
Regards,
Thilo

4096R/0xC70B1A8F
721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F


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

Post a Comment