I spend much of my time writing and reading a variety of code in text editors. Eye fatigue is something that I struggle with due to my habits. I’ve come to understand that colors and visual syntax ‘brought to life’ with the right tweaks relieves the eye strain. Yet for some reason, I’ve never found a good color palette syntax that does what I need it to do and does it well ( a big shout-out to tmTheme-Editor, absolutely brilliant ). I wanted something that is functional and relieving on my eyes. I use SublimeText as my editor (with vim bindings), but my theme can be applied to just about any editor that supports tweaking the syntax highlighting (Sh). My theme is a standard TextMate theming standard compliant theme. I’m sure it could be adapted for other editors too (please fork it!) .
If you’ve seen enough, you can just go to Github now and get the theme! Or read on.
I tend to comment well in my code. Which means my Sh needs to really make comments stand out. I also struggle with reading strings when embedded deep inside “foreign language code”, like /^Reg/ex and function.chaining(‘code’); these need to stand out. Library properties and language constraints need to be a little different than the code I’m writing and I prefer a dark background.
I began looking at some default styles around the web. One that really caught my eye was MagicWB(Amiga).tmTheme). It really makes an attempt to make the Sh functionally helpful. The highlighting serves a purpose and extends the readability of the code well.
I took a first stab at it
There are some problems with the amiga theme though. The gray background was not good for me. Also, the comments do not ‘pop’. But what I really enjoy is the strings. Look at them; you can’t miss them. I like this a lot. I started from that point. I came up with Downed Rainbow. My first few revisions were’t perfect. Much more obtrusive than functional.
A final rendition
But I kept at it. This was a work in progress, and I desperately wanted something better. I think I nailed it. I’ve been using this version with no tweaks for months now. I find it a joy. It’s definitely helped me out in my coding and reading and strain.
##It’s very feature complete for web development tasks!
Powerful language support
- Mustache Templating
- and of course html, ecmascript, css, php, sql, python
Diff supported highligting
- Numbers look different than strings
- Language constructs are entirely different colors than defined constructs
- Plugin support for SublimeLinter
- Comments and Strings are first class citizens
- Dark, but not totally black, background (blueish tint)
- Searching text matches stand out
I also have a few plugins installed that you may find helpful