Sunday, January 1, 2012

Re: why is Vim coloring text in txt files?

On 01/01/12 14:54, wolfv wrote:
> OK Tony, I changed my vimrc file, so lines 2& 3 read:
> source $VIMRUNTIME/vimrc_example.vim
> au! vimrcEx FileType text
> and it works. But what does line 3 do?

It removes the FileType autocommands for filetype "text" in autocommand
group "vimrcEx". The vimrc_example.vim includes the following (I'm
adding line numbers according to the latest version as of this writing):


66: augroup vimrcEx
...
69: " For all text files set 'textwidth' to 78 characters.
70: autocmd FileType text setlocal textwidth=78
...
82: augroup END

The other autocommand defined in that group is not for the same event.


See:
:help :augroup
:help autocmd-define
:help autocmd-remove


Best regards,
Tony.
--
Well, see, Joyce, there we were, trapped in the elevator. Now, I had
my tennis racquet and the goldfish; she was holding the Crisco. Surely
you can imagine how one thing naturally led to another!

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