Monday, December 26, 2011

Re: why is Vim coloring text in txt files?

On 27/12/11 03:49, wolfv wrote:
> Thanks Thilo and Tony.
>
> I Changed my filetype.vim code so when there is a "#" at the beginning
> of the first 3 lines, Vim sets generic configuration. i.e. I deleted
> this line:
>
> \ || getline(4) =~ '^#' || getline(5) =~ '^#'
>
> My txt files won't have a "#" in the first 3 lines, so that's good
> enough.

...except that making changes in anything in the $VIMRUNTIME tree is one
quite common way of, as Tim put it, "shooting yourself in the foot". Any
upgrade may (and one of them surely will, next week or next year)
replace $VIMRUNTIME/filetype.vim by a new version without telling you,
and any changes you made there will be gone. This is part of the
"normal" Vim way of doing things. Local changes should go in the _other_
directory trees listed in 'runtimepath' (installation-specific in $VIM
or user-specific in $HOME), $VIMRUNTIME is _only_ for _unchanged_
versions of runtime files distributed _together_ with Vim.

Best regards,
Tony.
--
There's no point in being grown up if you can't be childish sometimes.
-- Dr. Who

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