Well... first of all, this is a well-known topic that widely discussed everywhere already.
- [1] https://www.robertmelton.com/project/syntax-highlighting-off/
- [2] https://dudzik.co/digress-into-development/syntax-off/
- [3] http://www.linusakesson.net/programming/syntaxhighlighting/
- [4] https://groups.google.com/forum/#!msg/golang-nuts/hJHCAaiL0so/kG3BHV6QFfIJ
- [5] http://howivim.com/2016/damian-conway/
- [6] https://twitter.com/enneff/status/710071512330477568
- [7] https://www.youtube.com/watch?feature=player_embedded&v=dkZFtimgAcM#t=15m58s
So I started turning off my Vim's syntax color from May this year, it's 5 months already.
There some real benefits for it that I can confirmed now:'
- Getting more focus on the work, that mean, more productivity
- Read/understand the code better, and even faster
- Vim run faster as well
-
Being way more cooler, my colleagues now look at me as a guy from Mars
Is there anyone doing the same thing?
P/S: This is the color scheme I'm using for my vim https://gist.github.com/huytd/8394f21bda3a08be025813c060d64e75
Top comments (31)
Won't venture to disagree with others' results, but turning off syntax highlighting would be detrimental to me. Due to my dyslexia, I rely on it heavily to help me visually parse code, and catch typos early.
I'm not dyslexic, but I also find that syntax highlighting helps me catch typos early. The more distinctly colored different segments of text are, the better, in my opinion.
Well, at least you have good taste in music! :)
To each its own of course, but for the life of me I cannot imagine why I would want to turn off syntax highlighting. If it helps you being more productive and understand code better, then please continue, but it's not for me.
With highlighting, I can easier understand the structure of sentences in the source. Keywords stand out and I can quickly scan the code for the parts I am interested in. If I suspect something is wrong in the definitions I scroll up until the color of the code tells me I am in the definition part of the source. If I make a typo, the words don't color so it tells me I made an error so I would not want to live without it. To me syntax highlighting is the best thing since sliced bread.
On second thought - and clicking through some of the linked posts - I must add that I am using a scheme with few colors:
Last time I didn't have any syntax highlighting while coding, it was C64 BASIC, and I was 10. I have generally seen my code improve and my errors be easier to find as the degree of syntax assist tooling I've used has increased. Today, I use (all hooked into Atom) prettier, eslint, and syntax highlighting (Nord theme)... Not a whole lot of syntax errors go undetected.
So to me, this would be catastrophic advice.
I think, with code highlighting, you really need to evaluate what is being highlighted. Then you will suddenly notice that it doesn't really make sense to highlight everything.
For example Java keywords highlighting is not necessary - you can live with having them bold. Highlighting every code symbol (function, variable) also kinda misses the point. However knowing which variables are static and which are constants - is actually useful.
I don't think a developer should code without highlighting - that's a bad idea. But you should evaluate what highlighting you really need.
Your screenshot includes bold keywords and dimmed comments, so I assume you're either rolling your own or using a minimal syntax highlighting scheme, rather than actually turning it off?
You say "Getting more focus on the work, that mean, more productivity" but the only coloured thing on your screen, which immediately grabs attention, is a clock and a song title, both of which are totally unrelated to work (unless you're coding a bot that writes metal...)
I'm trying this out. Also trying out VIM since I delayed it quite some time!
I'm curious about your status line style and that music playing thingy. Would you mind sharing it? I love the style of it :)
It's just a script to display current playing song on Spotify on Tmux status line. You can take a look at github.com/jdxcode/tmux-spotify-info
For the tmux, I made a config file public here gist.github.com/huytd/10e490955d34...
How can you say:
Getting more focus on the work, that mean, more productivity
Read/understand the code better, and even faster
Without a parallel you working on the same thing over that period of time? This is bogus click bait.
Haha, I can’t believe some of these responses... seriously people? I learned to code long before syntax highlighting was a thing, and honestly, while I do use it today, I like a very tame color scheme for the most part. To me it seems like everyone should basically create their own theme, because we all think differently, and we all react to colors and other distractions differently.
Anyway, here’s to experimentation and exploration!
I worked a long time on various (exotic) platforms without effective or any syntax highlighting. I think it certainly makes you a better developer, in the sense of reading the code without aids, and taking assumptions of the editor (or any tool) you're using as granted. I could compare it to watching the movie vs. reading the book. You have to put in more effort, but it feels you just somehow get to a deeper understanding of the code.
Also, strictly speaking, your screenshot is not syntax highlighting off, it's just limited syntax highlighting. In most my cases, not even comments or language keywords were colored differently. ;)
I think every developer should try coding with highlighting off, if for nothing else then for an adventure and to stretch their limits. And it's good practice to reduce your dependency on your tools, just as good practice to keep your code's dependency to the minimum, if it's possible with reasonable effort. Otherwise it's just a matter of taste. At this point I can certainly switch back to not using syntax highlighting at all with a few hours of adjustment. But SOME syntax highlighting, just makes me more productive, I learned. And when you have work to do, that matters a lot.