Last updated January 9, 2014. Created by aspilicious on November 19, 2011.
Edited by Elaman, -enzo-, kostajh, Pere Orga. Log in to edit this page.

Sublime Text is a sophisticated text editor for code, html and prose. You'll love the slick user interface and extraordinary features.

Sublime Text is available for OS X, Windows and Linux.

Screenshot

screenshot sublime text

Configuration

For linux and mac users there is a script to auto configure your sublime at Sublime Drupal.

Go to "Preferences" => "Settings - User" and change the following settings:

{
  "rulers": [80],
  "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "use_tab_stops": true,
  "trim_automatic_white_space": true,
  "trim_trailing_white_space_on_save": true,
  "ensure_newline_at_eof_on_save": true,
  "fallback_encoding": "UTF-8",
  "default_line_ending": "unix",
  "shift_tab_unindent": true,
  "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}

Enabling whitespace characters

Optionally, you could also add add a setting to view whitespace characters to the end of the code settings (found above):

"draw_white_space": "all"

Useful plugins

  • Sublime Drush: A plugin that provides integration with Drush 6 for Sublime Text 3.
  • Goto Drupal API: A command to jump to the api.drupal.org documentation for the current word.
  • Go to Documentation: A command to jump to the documentation for the current word. Supported languages include PHP and Javascript.
  • Drupal Sublime text: A package for Drupal snippets, autocomplete support, and info file syntax highlighting for Sublime Text.

Other resources

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

Not strictly Drupal related, but here is a helpful step by step for setting Sublime up for PHP editing ...

http://urbangiraffe.com/2011/08/15/sublime-text-2-for-php/

EDIT :

This is also super handy - out of the box the double click to select won't select dollar signs, a real pain for copying PHP variables ... this post will sort that out

http://www.sublimetext.com/forum/viewtopic.php?f=3&t=2704

I created a Stack on Delicious that I am constantly updating as I find helpful links for developing on ST2. You can check out the links here. You will find 15 links (as of today) going through everything from the benefits of Sublime over other IDE's to Drupal-specific packages available for download.

Ricardo Vazquez
Myplanet Digital

I am also using additional, per-project config for phpcs:

{
  "folders":
  [
    {
      "path": "PATH_TO_YOUR_DRUPAL_INSTALLATION"
    }
  ],
  "settings" :
  {
    ...
    "phpcs" : {
        "extensions_to_execute": ["php", "inc", "module"],
        "extensions_to_blacklist": ["Test.php"],
        "phpcs_additional_args": {
            "--standard": "Drupal"
        },
        "phpmd_run": true
    }
  }
}

Claudio Beatrice
agavee.com

+1

This configuration is using on my sublime settings and the list of plugins is great.

And some tutorials for the begginer in the sublime text 2 https://tutsplus.com/course/improve-workflow-in-sublime-text-2/