4 ms·
I understand the spirit, but it is wrong. Syntax highlighting is helpful to me for the following purposes. 1. Scanning through code. 2. Making it clear what
by btilly 10y ago
I understand the spirit, but it is wrong.
Syntax highlighting is helpful to me for the following purposes.
1. Scanning through code.
2. Making it clear what is a comment, what is a string, and what is code.
3. Catching a variety of minor syntax errors automatically. (For example failing to properly close a multi-line quote...)
4. When switching languages, reminding me when I didn't fully switch gears and wound up using the wrong keyword.
I learned to program in vi without syntax highlighting. Before I tried syntax highlighting, I thought it was silly. After I tried it, I found it made for a more comfortable environment. The difference isn't huge, but it is noticeable enough that now I always turn it on.
- hosh 10y agoI have a similar experience. I learned to program as a kid with BASIC (no editor). I learned to read code while I was young because I was too lazy to type the BASIC games found in magazines, so it was easier to parse the game and play it in my mind. I cut my teeth on the MudOS platform, using the in-game `ed` to for rewriting backend code. I didn't use syntax highlighting for a long time. There are times when I log into a system to edit something with vim, and no syntax highlighting appears. It surprises me, but not a deal-breaker. I also thought syntax highlighting was unnecessary. The first time I saw a video of using the Twilight theme for Sublime, I was stunned by what the colors brought out. At that time, my awareness was not as developed, so I couldn't even tell you I liked it because of how I experienced the code. So I spent a lot of time finding good themes for my editors, first vim and now spacemacs. If I am going to look at code all day, I don't want my eyes to bleed. Aesthetics is the strongest argument I have for syntax highlighting, and it should not be casually dismissed without investigation.
- btilly 10y agoAesthetics matters a lot. Here is a simple example. Light text on a dark background tends to be more readable, but may depress some people. Dark text on a light background is the opposite. It sounds stupid, but it matters.