Color code highligher

Ask how to do things or if a certain feature is available in the program.
Post Reply
Ma.Sa.
Posts: 1
Joined: 06 Oct 2020 09:23

Color code highligher

Post by Ma.Sa. »

Hi,

I've been working with .css and .xml files, I see that in .css editor color code background is color code it self:
Capture.JPG
Capture.JPG (14.3 KiB) Viewed 937 times
can I do the same in .xml editor?:
Capture2.JPG
Capture2.JPG (22.79 KiB) Viewed 937 times

User avatar
pjj
Posts: 1853
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Color code highligher

Post by pjj »

Short answer: most probably not.

Longer answer: it's complicated. It's complicated, because this color background is employed for CSS highlighter and HTML multi highlighter, however simple changing highlighter manually won't work. You'll have to rename your *.xml file to *.html (and reload), or (possibly; haven't tested this) attach HTML highlighter to *.xml files -- but then you will lose your XML highlighting. You'll need to do some experimenting, I'm afraid.

Anyway, in all types of files hovering mouse cursor over hexadecimal code shows small tooltip with the appropriate color, and ability to open "Select Color" modal.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
pjj
Posts: 1853
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Color code highligher

Post by pjj »

Seems like I was wrong ...but then again not much.

There is, in fact, a setting to switch it on/off for certain highlighters (View > Highlight color values), but it doesn't work for me for *xml (nor *.md) files.

BTW, I think it would be very useful to be able to change this setting (and possibly some other ones, too) in Options window.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

Post Reply