People who see code in my text editor often comment about the lack of syntax
highlighting.
Over the dozen-odd years I’ve been writing code, I have used a few different
colorschemes. I favor dark, medium- to low-contrast themes because I find this
more comfortable on my eyes for extended reading.
I always considered my colorscheme to be an aesthetic preference. I hadn’t
questioned the tacit understanding that rendering each bit of syntax in a
different color was a necessary aid to programming practice until a few
years ago, when I became aware that some influential folks from the Go and Plan
9 world do not use syntax
highlighting in their editors. (Rob Pike went so far as to deride syntax
highlighting as
“juvenile”.)
I credit a lot of my growth as a programmer in recent years to the influence of
the Go authors and community, so the notion of disabling syntax highlighting
stuck with me. Maybe it was an entirely unnecessary practice that our industry
had adopted en masse? It wouldn’t have been the first “modern” programming
tradition to be productively challenged by my participation in the Go community.
So in 2016, I turned off syntax highlighting in Vim to judge this idea for
myself.
At first, it felt strange, like the text was pseudocode in an academic paper.
After a couple of days it stopped seeming foreign, but it still took more work
to understand code as I read it. The biggest problem was comments: the tiny
amount of effort to classify bits of text as comment or code added up. I
concluded that for myself, at least, distinguishing comments is a valuable
function of syntax highlighting.
I created my own minimal syntax highlighting theme which colored all text the
same way except for comments. I eventually made a few more concessions: coloring
string literals differently helps in the same way that coloring comments helps,
and in Markdown, highlighting section headers makes it easy for me to pick out
document structure as I scroll around.
The rest—a different color for each keyword, parenthesis, number, and so
on—I don’t miss. Three years later, I’ve barely thought about my syntax
highlighting at all. My minimal colorscheme isn’t better than the colorschemes
I used to use, but it turned out that most of the colors were unnecessary.