User Tools

Site Tools


Sublime Text 3

Sublime Text is an excellent text editor, available for Mac OS X, Windows, and GNU/Linux. It's the spiritual successor to TextMate, and has good (and growing) mind-share.

Sublime Text is commercial software ($70) but a free trial version is available.

We've moved to Sublime Text 3, even though it's still in Beta.


brew cask install sublime-text-3
# Make sure we can start Sublime Text from the command line.
ln -sf '/Applications/Sublime' /usr/local/bin/subl
# Add a custom icon for the app.
curl '' -o 'Sublime Text'
unzip 'Sublime Text' 'Sublime Text 2.icns'
sips -i 'Sublime Text 2.icns'
DeRez -only icns 'Sublime Text 2.icns' > 'Sublime Text.rsrc'
touch $'/Applications/Sublime\r'
Rez -append 'Sublime Text.rsrc' -o $'/Applications/Sublime\r'
SetFile -a V $'/Applications/Sublime\r'
SetFile -a C '/Applications/Sublime'
rm 'Sublime Text' 'Sublime Text 2.icns' 'Sublime Text.rsrc'
# Create a dock icon.
dockutil --add '/Applications/Sublime'
# Install the Package Control package.
mkdir -p "$HOME/Library/Application Support/Sublime Text 3/Installed Packages"
curl -O -o "~/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package"

Add-On Packages

See for a full list of available packages.

Here's how to add a package: Hit Command + Shift + P to open the command palette. Type (partially) Package Control: Install Package and hit Enter. Type (partially) the name of the package, or scroll through the list. Hit Enter when you've found the package you want. Some packages may take a while to download and install. Many packages will open a new buffer with a README when they're done installing. They'll generally also add a menu item to Preferences / Package Settings. Restart Sublime Text to be able to use the plugin.

We generally like to have the following packages installed:

  • Package Control
  • SideBarEnhancements
  • SFTP
  • Theme - Soda
  • GitGutter (adds colored indicators in the gutter for lines that have been added or changed)
  • Alignment
  • SublimeCodeIntel
  • Status Bar Extension


  • Anypreter
  • Apidock
  • BeautifyRuby
  • Capybara Snippets
  • Additional PHP Snippets
  • AdvancedNewFile
  • All Autocomplete
  • Alternative Autocomplete
  • AndyJS
  • AndyPHP
  • AndyPython
  • AngularJS (CoffeeScript)
  • AutoFileName
  • AutoPEP8
  • ChangeQuotes



Preferences / Settings - User, add:

    "theme": "Soda Light.sublime-theme"


By definition, all lines in a text file must end with a newline character. (See the POSIX definitions of Text File and Line.) We can ensure that by adding this to Preferences.sublime-settings. We also trim whitespace from the ends of lines on save.

    "ensure_newline_at_eof_on_save": true,
    "trim_trailing_white_space_on_save": true,


    "bold_folder_labels": true,
    "fade_fold_buttons": false,
    "highlight_line": true,
    "scroll_past_end": true,
    "font_size": 15.0,
    "dictionary": "Packages/Language - English/en_US.dic",
    "caret_extra_width": 2,

Key Bindings

We want to remap a few key bindings. These are under Preferences / Key Bindings - User.

We want to change Control+Tab to cycle through tabs in the order they appear, instead of the order in which they were last accessed. We also want to Control+PageUp and Control+PageDown to cycle through tabs in the same way.

    { "keys": ["ctrl+tab"], "command": "next_view" },
    { "keys": ["ctrl+shift+tab"], "command": "prev_view" },
    { "keys": ["ctrl+pagedown"], "command": "next_view" },
    { "keys": ["ctrl+pageup"], "command": "prev_view" }


  • Pick a color scheme:
    • Light:
      • Solarized Light
      • 2morrow
      • clouds
    • Dark:
      • Tubster
      • Railscasts
      • Oceanic Muted
      • Ruby Blue
      • Black Pearl
      • 2morrow Night - Bright
      • Monokai Dark
      • Neon
      • Bespin
      • Cobalt
      • Darkside


  • Can we programmatically install the license?
  • Can we programmatically install plugins?
    • Yes, but we'd like to do it with Package Control instead of git.


mac/sublime.txt · Last modified: 2014/04/26 14:16 by Craig Buchek