Monday, December 26, 2011

Re: why is Vim coloring text in txt files?

On 26/12/11 09:20, Thilo Six wrote:
> Hello
>
> -- <snip> --
>> ,----[ ft=text ]---------------------------
>>
>> " txt
>> autocmd BufNewFile,BufRead
>> \ *.txt,
>> \\c*README*
>> \ setl ft=text
>> `---------------------------------------------
>
> I just figured i probably introduced new cpo-bugs. Wolfv if you use this as is
> you need to add also at the beginning of this file something like:
>
> let s:cpo_save =&cpo
> set cpo&vim
>
> ...and at the end:
>
> let&cpo = s:cpo_save
> unlet s:cpo_save
>
> -- <snip> --
>

It's OK if you have a vimrc, never use vim -u <filename> or vim -u NORC
without also -N, don't explicitly :set cpo+=C and don't redistribute the
script. But save-restore as above is more prudent.

Best regards,
Tony.
--
Old age is the most unexpected of things that can happen to a man.
-- Trotsky

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