Consider this my obligatory Sublime Text 2 post. ST2 has become my editor of choice (over BBEdit, among others) based on how powerful it can become through the use of plug-ins. Here a few of mine that I find useful.
Package to quickly find the differences between two files with a user-defined keyboard shortcut. Normally, a new tab will open that identifies the changed lines. I have actually turned this off because the awesome aspect of this plug-in is the ability to set up an external diff tool. I use the not-cheap, but excellent Kaleidoscope. When I select
Shift-Ctrl-F, and choose what I want to compare the open file to, Kaleidoscope opens immediately with much better visual indications of what exactly has changed. Very useful. 1
Standard Brett Terpstra greatness for writing Markdown in Sublime Text. Auto-pairing of Markdown characters, keyboard shortcuts for pasting Markdown links, and a special color scheme just for Markdown files. Also recommended if you are a Marked user is the Marked Bonus Pack, which includes a Sublime Text Build System to quickly preview a Markdown file in Marked. If you are not a Marked user, well… see the next tip, but you should really get yourself checked out.
A very simple package that gives some nice Markdown preview options, in a browser window or a new tab with generated HTML. I use
Option-m for the former, and it is quite fast.
Have your cursor sitting in a Markdown header? The
Tab key will fold all the text beneath that header.
Shift-Tab will fold all the headers in a document, regardless of where your cursor is. There are also shortcuts for navigating through different headers and increasing/decreasing their level.
Write Sass? This gives you syntax highlighting for
.scss files. Another somewhat-related tip: I use Bryan Jones’ excellent app, CodeKit to generate all my Sass files. CodeKit also has its own Kit language to create HTML partials. In order to get
.kit files to have HTML syntax highlighting, go to the
HTML package in the Package directory and find the
HTML.tmLanguage file. In the
fileTypes array near the top, add this line:
Two excellent plug-ins for managing projects in Sublime Text 2. I wrote about them here.
Git, SideBarGit and Git Gutter
All great plug-ins for integrating git into Sublime Text. I especially like Git Gutter. It adds small symbols in the gutter that indicate added/deleted lines since the last commit.
Keyboard shortcuts for creating new editor panes and sending documents back and forth between them. The keyboard shortcuts take a bit to become second nature, but definitely worth it.
After you have installed all these plug-ins, use this one to quickly get access to any installed plug-in’s README file.
Themes and Color Schemes
I have to yet to find the perfect theme for ST2, but currently I’m running the Flatland Dark theme, along with its color scheme. Phoenix is another great theme with a lot of options and more often than not I find myself using the dark version of the default Solarized color scheme.
I followed the directions to use Kaleidoscope with the plug-in here, but the app would not open. I believe with Kaleidoscope version 2, the app now places the command line utility
/usr/local/bin. In my FileDiff User Settings file, I had to explicitly set the path to
"cmd": ["/usr/local/bin/ksdiff", "$file1", "$file2"], rather than creating a symlink to
usr/binas described in the wiki.↩
Spaces, not tabs. Two of them.↩