3 ms·
Not sure I agree with this. Syntax highlighting helps me read code very much. I notice this every time I end up in an SSH session looking at code in some versi
by jiggy2011 15y ago
Not sure I agree with this.
Syntax highlighting helps me read code very much.
I notice this every time I end up in an SSH session looking at code in some version of nano without it enabled or when reading code on a webpage that is not highlighted.
Our brains are designed (or evolved) to look for patterns in things, colours help this.
Most of the time when I am in code I am not interested in reading the whole thing anyway, I just want to make a quick change to something like, for example the contents of a particular string.
In that example having the string literal inside the quotation marks light up in a different colour makes it much quicker to distinguish it from the rest of the code, the same the comments.
It also makes it much easier to distinguish where function definitions start if the definition is in bold.
Coupled with the fact that it makes it easier to spot spelling errors in keywords since they will not light up the expected colour.
I think I can also spot common patterns of code (like say foreach statements) more quickly because of the the pattern is reflected by the pattern of colours on a line.