My Sublime Prefs05 Dec 2015
As a segue from the previous post on setting up the developer environment, I wanted to record my current setup for Sublime Text build 3083. This is not a post that debates the relative merits of this or that text editor. Maybe some other time.
I love Sublime Text. As a tool that I use daily in my chosen profession, I am more than happy to pay for the registered version and support the developers who make it. This should not be taken as a jab at any other text editors, open source or otherwise. Software developers and engineers are known to be obsessively defensive of their chosen favorite tools, most notably text editors.
Now that we have that out of the way, here is what works for me.
I use two machines, a desktop and laptop, so I sync Sublime Text settings via Dropbox. Instructions to do this are located here.
Here are the contents of the synced preferences file:
The usual suspects are here. I am a big fan of matching popular style-guides so I will use “tab size: 2”, and “translate tabs to spaces” enabled. “Save on focus lost” is a life saver as well as a time and sanity saver, especially on large projects.
“Trim trailing white space on save” is pretty self-explanatory, but for more information as to why “newline added on EOF (end of file)” should be used, check out this enlightening post on thoughtbot’s blog that explains the history.
Inconsolata-dz, a variation of the superb
Inconsolata font that includes straight quotes. I really love it, and can’t recommend it enough. Since I sync my Sublime settings from desktop to laptop and I like to reduce eye fatigue instead of squinting, it is set to a slightly larger font size than normal.
Inconsolata font created by Raph Levien is located here.
Inconsolata-dz variant by David Zhou is available here.
Again, the subject of code fonts is highly contentious among the developer community, so in the interest of brevity I won’t elaborate further here. Maybe another day.
I use Jamie Wilson’s excellent theme, Predawn, and I follow the recommendations on that page for Markdown editing.
It is naturally available via Package Control.
Speaking of packages, here are my currently installed Sublime Text packages:
- Better CoffeeScript
- Color Highlighter
- Package Control (of course)
- Predawn (Aforementioned theme)
Since I recently reinstalled my OS, I
may will definitely find more to download. One that springs to mind is SublimeLinter and its language-specific packages.
Here is the contents of the synced Key bindings file: User/Default (OSX).sublime-keymap
The ERB shortcut is used by SublimeERB to cycle between
<%# %>, and
<% -%> and places the cursor helpfully inside of these monstrosities to ease the pain of typing embedded Ruby delimiters.
Paste and Indent makes this behavior default for
⌘-v, and allows me the option of reverting to the old paste using shift, in case I ever need it for some wacky reason.
Reindent saves me from hunting for this useful command in the menus.
I turn off the Minimap as it takes up valuable real estate and usually I just don’t use it.
What else? Oh yes, the app icon! The default icon that Sublime Text uses is a tad, well… it’s not nice to look at on the dock all the time. I prefer replacing it with a different one. This of course is just a cosmetic change, but there you have it. I regret nothing.
Dribbble user Lucifr offers a few crowd-sourced replacements: “Icons much less ugly than the default one for Sublime Text 2”, (they work for Sublime Text 3 too of course.)
I use this one by Daniel Matarazzo adapted from an icon by Lindsay Mindler:
To get it, follow the instructions on Daniel’s GitHub repo, although I recommend renaming the Resources folder to Resources-old or something so you can get the originals back if you need them later.
A little extra step that I found was necessary after following the above instructions was to actually replace the icon in Finder:
First download your chosen image file, preferably a PNG for scalability. Select Sublime Text.app and type
⌘-i or right-click (a useful holdover from my PC days) and select Get Info. Drag and drop your chosen image file onto the ugly icon image in the Info window (top left corner). Enjoy your sleeker Sublime Text icon.
If you have any suggestions for packages, themes or key-bindings, or if there is something horribly wrong with the above information, please feel free to reach out to me via Twitter or shoot me an email.
Thanks for reading and happy coding.