My “No Frils” theme for vim has so few frills we got ride of the extra L! Anti-syntax highlighting theme for Vim. Strives to theme everything without gaps in a minimalist, syntax off manner.
Laziness. A friend who works in the cognitive sciences asked me if I had ever experimented with it, and I said something along the lines of “oh, my gosh, that would be awful” and was challenged to do a 7 day experiment… and here we are. I am exceptionally lazy, and am always looking for ways to make programming easier. This wasn’t born of masochism, machismo or hipster-ism, pure laziness – it made my job easier.
No, why does it help?
I honestly am not sure, I made some guesses in my original posts, but have no evidence backing any of it – pure conjecture.
So you just turn off syntax highlighting?
Basically, yes. I still have gentle syntax highlighting for comments and matching parentheses and other vim features. The benefits of having it off for me are non-trivial and unexpected. I use my own No Frils theme, which I tweak slightly from time to time.
Have you even tried syntax highlighting?
Yes. Around 20 years of it. Including things like rainbow parentheses, rainbow identifiers and other very fancy syntax highlighting.
Any specific benefits?
- Context switching between languages is significantly less jarring.
- You don’t end up fighting with syntax highlighting you feel is wrong.
- Reading code is simply more straightforward, smoother and less jumpy.
- I get the overarching context faster and with less hassle. This helps a ton when reading other peoples code and helps a little when writing fresh code.
- When writing new code, it tends to make you focus on a clean general flow because you don’t have syntax highlighting to guide your eye.
Anyone else do this?
- A case against syntax highlighting
- :SYNTAX OFF
- Snark from Rob Pike “Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods (http://en.wikipedia.org/wiki/Cuisenaire_rods). I grew up and today I use monochromatic numerals.”
- Linus (of Linux) uses Micro-Emacs which doesn’t offer syntax highlighting
- Damian Conway (of Perl)
- Andrew Gerrand (of Go)
So, it has been a little over a year (started the experiment Sept 5th, 2015) with syntax highlighting off … and this is what I have learned… in no particular order.
Note: I wanted to release this on Sept 5th, but stuff got crazy! Sad to miss that exact 1 year anniversary.
What have I learned?
- People on the internet will get very angry at you if you tell them you don’t like syntax highlighting. VERY ANGRY.
- Bad syntax highlighting is worse than none at all. (IE: regexp based is often wrong, and wrong is terrible).
- No syntax highlighting isn’t really what I wanted, I wanted nearly none. Still like string backgrounds to be tweaked and comments to be faded.
- There really aren’t any good studies on this stuff – the few that exist are tiny samples sizes and filled with tons of conjecture.
- If you hop around a lot of languages, the lower context switching is a real benefit.
- If you want to try it – give it a REAL try – 7+ days of uninterrupted use, after that you will know if it helps you.
- It increases the value of spot highlighting (keyword searches, even multiple different color search highlights if you have a plugin for that).
- I miss the colors, I still sometimes fire up Emacs (https://i.imgur.com/zhCs4Bv.png) with Evil to use floobits and it is easy to enjoy the pretty colors, for short stays at least.
- It makes writing and reading code easier and my code output better – no surprise here else I would have stopped right?
- Writing a “no syntax highlighting” colorscheme takes more time than you would think (once you add a few features), and porting it to other places cough emacs cough doubly so. (/me mumbles “still working on it”)
- When writing new code, it tends to make you focus on a clean general flow because you don’t have syntax highlighting to guide your eyes.
- It is something I will continue – report back in a year I guess. /wave