Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very interesting, I don't think I've ever talked to someone who would choose to disable syntax highlighting. Do the colors actively annoy you or is it just that you don't care?


I tried both ends of the spectrum.

There’s definitely something real about too much colours; the archetypal example of colouring our human language tokens by type (verbs, nouns, etc) making no sense sure rings home after a while.

But I found very much use of “colour”+ themeing for two things:

- comments vs code, one toned down vs the other, ideally swappable with a hotkey

- delimited content such as strings. It sure saves a lot of time when you get an imbalanced delimiter nested in a forest and the whole of your file changes colour starting near the imbalance.

I’m very much of the opinion that a lot of syntax highlighting is just dumbed down token matching and badly designed (if at all designed), when it should be much smarter in alerting you of inconsistencies, and putting relevant content forward.

+ by colour I don’t necessarily mean literally in colour, bold or italics can serve well.


I am looking forward to smart highlighting that does what you say (marking errors and inconsistencies, like perhaps a truthiness check being used with a variable that could be both null and undefined in case of a typed language) and otherwise is based on context (for example, highlighting a variable that was defined in outer scope is something that could be legitimately useful).

Colouring human language by tokens is a very fitting analogy.


I have seen some C code so heavily #ifdef'ed that toning down the parts that are excluded in the current build would be helpful.


Count me as another. I find syntax highlighting to be distracting unless it is done with some restraint (which it rarely is), and not helpful enough for me to bother with coming up with my own scheme or searching for one that I like.

I am sure there are corner-cases where I would want to enable it, such as were someone has been in the habit of commenting-out parts of a line.

I don't know anyone who uses syntax highlighting for natural-language prose, though I suppose there are some who do.


I find that not having highlighting to rely on forces me to write more readable code. I might turn it on if I happen to work on a hairy codebase under time constraints.

Sometimes also colors in general can get distracting and I just turn on grayscale system-wide, which also doesn’t play with syntax highlighting as text ends up being varying shades of gray with not enough contrast against the background.


I grew up without it and I think my brain is wired to recognize visual structure instead of colors.

Switching it off is the first I do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: