4 ms·
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 t
by lloeki 6y ago
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.
- mannykannot 6y agoI have seen some C code so heavily #ifdef'ed that toning down the parts that are excluded in the current build would be helpful.
- strogonoff 6y agoI 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.