News for hackers. Stuff that matters.
Re:Syntax highlighters are wrong (2014) by kqr on Monday May 27, 2019 @09:57AM (#20022238)
I strongly recommend trying a middle ground. I find nearly all highlighting schemes in use today overly garish, so I always find myself customising my own with relatively few colours with the idea of doing as little as possible to bring out the structure of the code:

- Comments and string literals can look like code without being code, so they get their own separate colours to make it easier to quickly scan past to where they end.

- Types live in a different dimension from the rest of the code, and tell me a lot about what it does, so they get a different colour.

And, finally, the one I've been trying for a while but am still not convinced about:

- Structural keywords (for loops, branches, etc.) get a separate colour as well.

All these colours are of course relatively neutral. I'm especially confused by people who use bright red for anything. That's a colour I use extremely sparsely for actual errors and bugs.

There are no comments on this comment yet.