Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toggle w3c_color_names ? #10

Closed
teschmitz opened this issue May 7, 2012 · 3 comments
Closed

toggle w3c_color_names ? #10

teschmitz opened this issue May 7, 2012 · 3 comments

Comments

@teschmitz
Copy link

It can sometimes be a bit annoying to have w3c names colourized in comments.

Would it be possibble to exclude comments from colourizaton? (and if so have a toggle for it)

Alternatively, could I suggest a on/off toggle and global variable for use in .vimrc for w3c names?

chrisbra added a commit that referenced this issue May 8, 2012
@chrisbra
Copy link
Owner

chrisbra commented May 8, 2012

On Mon, May 7, 2012 13:13, teschmitz wrote:

It can sometimes be a bit annoying to have w3c names colourized in
comments.

Would it be possibble to exclude comments from colourizaton? (and if so
have a toggle for it)

Alternatively, could I suggest a on/off toggle and global variable for use
in .vimrc for w3c names?

That should work now. See the help :h Colorizer-comments.

Note however, the problem is that once coloring for a code or name is done
outside of an comment, the same color will also be highlighted within
a comment.

regards,
Christian

@teschmitz
Copy link
Author

That's absolutely fantastic that you managed to implement that, and so quickly!

I notice that if you toggle g:colorizer_colornames off during the session, colour names that were colourized before will remain colourized. Colour names that weren't colourized prior to toggling the switch off will not be colourized.

If this behaviour is intended or unavoidable you should maybe add a wee note to that effect in the docs. (I thought it wasn't working, exited vim and re-tested.)

I think it might be a good idea to re-order the configuration section of your docs:

            2.1 Automatic loading....................|Colorizer-auto|
            2.5 Automatically highlight filetypes....|Colorizer-hl-ft|
            2.6 Skip coloring comments...............
            2.3 Adjust the contrast..................|Colorizer-contrast|
            2.4 Highlight colornames.................|Colorizer-hl-names|
            2.2 Use X11 colornames...................|Colorizer-names|

in particular to group the two colour names options together. Maybe add that "Highlight colornames" toggles all name recognition on/off (w3c + X11)?

Thanks for putting so much effort in the documentation - makes a huge difference to the usability and acceptance of the software.

@chrisbra
Copy link
Owner

chrisbra commented May 9, 2012

Hi teschmitz!

On Di, 08 Mai 2012, teschmitz wrote:

That's absolutely fantastic that you managed to implement that, and so quickly!

I notice that if you toggle g:colorizer_colornames off during the session, colour names that were colourized before will remain colourized. Colour names that weren't colourized prior to toggling the switch off will not be colourized.

If this behaviour is intended or unavoidable you should maybe add a wee note to that effect in the docs. (I thought it wasn't working, exited vim and re-tested.)

I think it might be a good idea to re-order the configuration section of your docs:

            2.1 Automatic loading....................|Colorizer-auto|
            2.5 Automatically highlight filetypes....|Colorizer-hl-ft|
            2.6 Skip coloring comments...............
            2.3 Adjust the contrast..................|Colorizer-contrast|
            2.4 Highlight colornames.................|Colorizer-hl-names|
            2.2 Use X11 colornames...................|Colorizer-names|

in particular to group the two colour names options together. Maybe add that "Highlight colornames" toggles all name recognition on/off (w3c + X11)?

Thanks for putting so much effort in the documentation - makes a huge difference to the usability and acceptance of the software.

Thanks for your feedback. I'll update the documentation and include the
other changes as well.

regards,

Christian

Über der Veränderung liegt stets ein Hauch von Unbegreiflichkeit.
-- Carl Friedrich von Weizsäcker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants