lilydjwg/colorizer

Automatic Highlighting

Closed this issue · 5 comments

Currently I have to type :ColorToggle to enable color highlighting.
Is autocmd in my .vimrc the only way to enable color highlighting by default?
Is there a design choice of why it is not enable by default? I do not working with big files, but I was curious if my gVim will slow down a lot in such cases.

Well, what about a global variable then---set the following and colorizer will be enabled at startup:

let g:colorizer_startup = 1

I set the variable as you have suggested, but it did not work me. I could not find that variable anywhere in colorizer.vim . ColorToggle is working fine for me though.

Hi, I was asking if a global variable is better than an autocmd for you. I've added that just now. Please update.
To me, they're both one line anyway...

Thanks. I actually wanted it to be the default behavior, because I think that is what the end user would expect when he/she installs a plugin. That variable can be used to disable the auto highlighting instead and I think there wouldn't be any surprises. It is more likely that the advanced users can figure things out and disable it by merely glancing over the plugin file.

That makes sense. Updated.