Over a million developers have joined DZone.

My Sublime Text Setup

DZone's Guide to

My Sublime Text Setup

· Performance Zone ·
Free Resource

Sensu is an open source monitoring event pipeline. Try it today.

I absolutely love this editor. A ridiculously fast editor which has everything you’d love to have from a simple notepad to an advanced, extensible IDE with auto-completion, highlighting to whatever you’d like to have. This post aims at mainly being a setup reference for myself.

Actually, I’m a bit late now, as a couple of days ago Alex MacCaw posted published exactly a similar post to this one here. So go and check that out as well, it contains a bunch of valuable information.

Sublime Configuration

I usually have the following customizations:

    "font_size": 16,
    "tab_size": 4,
    "translate_tabs_to_spaces": true

The large font for being able to focus better on a smaller context which I found quite useful. Moreover it’s more relaxing for my eyes.

I usually leave the tab-size on “4” as that’s what my other colleagues are accustomed to have in their IDEs. But note you might want to set it to “2”, especially when using CoffeeScript as it is more handy there.

Access from the Shell

In order to use sublime productively, one of the first steps is to make it accessible from your shell.

On OSX, the best way (as already Alex mentions in his post) is to create a symlink to your Sublime installation directory like

ln -s "/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl" /usr/bin/subl

But since I’m also working as a .Net developer and thus I’m having a Windows machine at work, I’d like to have the same functionality there as well. As such I created a special directory under C:\bin\utils which is linked in the PATH environment variable. Inside that directory I created a subl.cmd with the following content:

@echo off
"C:\Program Files\Sublime Text 3\sublime_text.exe" %1

Installing Packages

Sublime wouldn’t be that rich and useful without its packages (extensions basically). If you miss any kind of functionality, search for a package and I bet there is one already available.

Package Control

Url: http://wbond.net/sublime_packages/package_control

Package Control is simply a package manager for Sublime Text packages and extensions.

Package Control can be installed using Git. Navigate to the “Packages” folder (you can use your menu to find it Preferences > Browse packages...). Then execute the following commands

git clone https://github.com/wbond/sublime_package_control.git "Package Control"
cd "Package Control"
git checkout python3

Restart Sublime and you’re done.

To use Package Control simply press Ctrl+Shift+P to open the Sublime Menu and write

  • Install for installing a new package
  • Upgrade for upgrading an existing package or
  • Remove for removing an existing package.

My Packages

Here’s a list of packages I’m currently using with Sublime Text. I’ll add/remove this list over time as I find new interesting and useful ones. The installation instructions as well as the packages I listed should work on both, Sublime Text 2 as well as Sublime Text 3 (which is currently in private beta). But since I’m using the latter, you might experience some trouble in using some of them with v2.

Note, if there is no hint about the installation of a package, you can simply use Package Control for adding the extension to Sublime Text.

Package Name Description
Emmet Adds Zen-coding capabilities to Sublime Text. See the docs for a list of available commands and usage instructions.
Sublime TFS A must have package if you have TFS as your version control system. After installation you should see a "TFS" menu which illustrates the major commands.
SideBar Enhancements Adds a bunch of useful functionalities to your Sublime's sidebar context menu like copy path, duplicate file, move, copy etc...
SublimeLinter Linting support for Sublime
DocBlockr Augments Sublime for easy commenting of your JavaScript code. Adds comment blocks like:
 * [testFunction description]
 * @param  {[type]} param1
 * @param  {[type]} param2
 * @return {[type]}
testFunction : function(param1, param2) {
AllAutocomplete This package extends Sublime's amazing autocomplete support over multiple files.
TrailingSpaces Allows to configure Sublime to highlight or even automatically remove all trailing spaces. Take a look at the docs for instructions on how to configure it.
My current setup adds the following to the user preferences:
{ "trailing_spaces_trim_on_save": true }
and this to the package's preferences
    "trailing_spaces_include_current_line": false
SublimePrettyJson Prettifies a compressed JSON string in the editor.
MarkdownEditing If you love markdown teh same way as I do, this plugin is definitely a must have.
MarkdownPreview Although I use this less often, it is quite useful for quickly previewing your created markdown document in a browser.

Sensu: workflow automation for monitoring. Learn more—download the whitepaper.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}