Find Me


Sometimes You Only Need One Hammer — Text Editors on the Mac

The problem is one of too many hammers and not enough nails.

I would love to know how much time I have spent over the last few years wrangling multiple tools that could be used for the same purpose. Text editors, task managers, simple todo list apps, reminders apps, podcasting apps, email apps, beer apps, pinboard apps, calendar apps, photography apps… the list goes on and on.

Having multiple tools to do nearly the same job adds friction just like having to root around in your toolbag to find the hammer you need amongst a pile of twenty hammers. Generally, the first hammer that comes to hand would suit the task perfectly fine.

Don’t get me wrong — there is value to looking at a few solutions for solving a problem. I am sure the first text editor I ever downloaded wouldn’t have provided me with as much flexibility as what I am typing into now but I think it is worth begging the question – “Could I do what all of my text editors do with just one text editor?”

The goal of this series is to get me down to one hammer on each platform for the tasks I do most often. Today I am going to tackle one of the areas I tend to waste a lot of time and money on — text editors on the Mac.

How Many Text Editors Does a Person Need?

I currently use the following text editors on my Macbook Air over the course of a typical week.

FoldingText is the tool I live in most of my work week. I start a document on Monday that contains all of the meeting notes throughout the entire week. Having all of my notes compiled in one document makes searching easy, provides me with a time-based grounding for meetings that helps me reconstruct events and keeps the number of open documents to a minimum. FoldingText’s ability to condense the information on the screen to just the section I am interested in is invaluable when I just want to take notes on a single meeting and not see the clutter of the rest of my document.

nvALT is where a lot of text documents start. I have various Alfred workflows that generate documents through nvAlt and search nvALT for things all the time. It is an amazing and eminently-useful tool.

Byword is the text editor I have written the most words in for the last three or four years. All of my writing starts here in one way or another, mainly because I love the presentation of markdown within the editor. The fading of the markdown tagging and the flow of the text is really conducive to how I think.

Textastic is something I mainly used for coding and viewing code. While Coda has a great coding interface in a pinch, I liked having a dedicated app and I was being stubborn about Sublime Text’s steep learning curve so Textastic fit the niche really well. All code-like documents have opened in Textastic on my Macs for a number of years.

Sublime Text is a recent addition. Various attempts to be beguiled by its nerdy charms have occurred and I have downloaded it multiple times over the last few years 1. Every once in a while something a friend will say or an article I chance upon will entice me to give it a shot. Each time I read up on it, usually starting with a guide, and try to make it useful to me but each time I delete it, frustrated by its settings files, bewildered by its hundreds of package add-ons and confused by its dozens of new keyboard shortcuts.

Each one of those applications are great in their own right and each is well-suited to its particular task. But, with each one, comes its own spot of friction. The more I thought about it, the best case would be to use a single text editor on my Mac. No more deciding which app to use when deciding to write a blog post. No more overlapping piles of windows cluttering up my desktop.

One hammer. And Sublime Text is it.

Hammer Replacement

In order to replace a tool, you need to know what it is and isn’t doing for you.

Byword is a competent editor with good document statistics, nice markdown preview and a great markdown syntax highlighting. Textastic is a nice editor that works well with fixed width fonts and has stellar formatting and syntax highlighting. FoldingText gives me a great way to guide and hold context while typing in a huge document of meeting notes and provides excellent outlining editing capabilities for moving nodes in and out of document structures.

Each has strengths that would need to be replaced by a single app. That’s a pretty tall order.

I couldn’t think of a text editor besides Sublime Text that would even come close so I started digging into how I could replace each one of the features listed above. Given my history with the Sublime, I was pretty sure this was a non-starter but the idea of consolidating tools was gaining a lot of traction in my mind and felt I needed to give it a fair shot.

Gabe has done a much better job explaining Sublime and its charms than I ever could but I’ll attempt it anyway. Needless to say, you will need to know how to install custom packages in Sublime to make this all work so, if you are still interested, read on. I will cover some of the beginner stuff in my Quick Tips section at the end of the article.

Building a Better Hammer

To make Sublime Text more useful in general I installed:

Package Control allows you to install packages seamlessly within the Sublime Text interface. This should be your second step, right after installing [Sublime Text][sublime.

I also like using the Solarized theme when writing so I made it my default and set my default font to InputMono. I use Theme Scheduler to change my themes from light to dark based on the time of day, like every nerd should. Since there’s no good way to toggle theme changes for markdown files, I created a pair of Keyboard Maestro macros that do it for me. It’s not perfect system but there is a point where too much fiddling is just too much. it’s ugly but it works2.

To replace Byword and FoldingText, I installed:

This combination does highlighting for markdown syntax as well as gives me a nice fullscreen distraction free mode when I’m in meetings. Typewriter keeps the current line locked to the center of the screen which cuts down on that feeling of not having a sense of context within the document. Marked integration is obviously a big help. Having a second virtual desktop with a fully formatted document for preview is damn handy.

To replace Textastic and nvAlt, I installed:

Since Sublime Text already has support for most programming languages (including syntax highlighting and code completion) I plan on using it for those tasks. One of the things I used nvALT for was creating my new weekly “meetings” files with a TextExpander macro. It was so easy just to open the nvAlt window, type the command which expanded to a properly formatted file name and hit “enter” to create the file. Now, with the Advanced New File package, I have the same functionality but all within Sublime Text.

I’ll cover BetterFindBuffer in a future post where I tackle my “task management” bag of hammers.3

Quick Tips for a Using Your New Hammer

  1. First go here and do what it says.
  2. To quickly do most of the things I have outlined above, remember that the key combination ⌘-shift-P is your friend. This will bring up the Sublime Text Command Palette. From there, typing “Install Package” will bring up the Package Installer and you can add any of the items listed above in seconds.
  3. Always edit the “-User” settings files in the preferences. They will override anything in the Default file. They are usually located at “Sublime Text > Preferences > Package Settings”. If you’re not sure what settings you can edit, take a peek at their Default file.
  4. ⌘-P will find anything in open files or folders in your current Project. I created a default project that has my default Dropbox text file directory and a few others. It will find the text you are searching for at least as fast as nvALT. Most searches are as simple as hitting a few letters and “enter” to open your target file.
  5. ⌘-R will open a document map, or outline. Depending on the structure of the document, it may give you some great info. For this article, it gives me a list of every header that I can jump to instantly.
  6. I can never remember hot keys. Command Palette to the rescue! Again, the combo ⌘-shift-p will bring up a text box which will quickly search all commands and hitting “enter” will execute it. If you want to keep your hands on the keyboard, this is a lifesaver.
  7. ⌘-option-left/right arrow will shuffle through your open documents.

After using Sublime Text for a little while now, I can see the potential is great. I have passed the fiddling stage and I am just working in it. Minimal app switching, easily-focused attention and lots of nice perks that keep things flowing. At $70, Sublime isn’t something you just run out and buy, even with what I just wrote. Luckily, their purchasing model supports trying it out for a while, kicking the tires and getting to know the thing.

It has been interesting researching and writing this article. What started as an exploration of ways to reduce the number of text editors I employ ended up as a paean to Sublime Text. I had no idea I’d be able to do so much with this app given my previous frustrations with it but, with a little persistence, I have gotten some huge rewards.

  1. It is free to try out and $70 to purchase. 

  2. I have gotten a few questions about what this Keyboard Maestro shortcut is doing. Here’s the gist: I created two copies of my settings file and renamed them with a prefix of “light” and “dark”. In each of these files, I edited the theme to be the Solarized Light or Solarized Dark theme. The Keyboard Maestro macro deletes the current user package settings file and replaces it with either the light or dark depending on the time of day or a typed hotkey. Sublime detects the change and immediately refreshes all of the files that the package is associated with (in this case, all of the file types I have associated the Markdown syntax type). Sometimes the computer hibernates and forgets to change the theme based on the time so typing the hotkey will force the change. 

  3. Hoo boy, that’ll be a doozy.