Community Documentation

Configuring Sublime Text

Last updated March 18, 2013. Created by aspilicious on November 19, 2011.
Edited by chrisjlee, milodesc, rballou, persand. 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.

It is available for windows, linux and mac osx

Screenshot

screenshot sublime text

Configuration

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"

Links

Comments

Not strictly Drupal related,

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

Handy resouces

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

Excellent

+1 This configuration is

+1

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

Beginner Tutorial

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

Page status

No known problems

Log in to edit this page

About this page

Drupal version
Drupal 6.x, Drupal 7.x, Drupal 8.x
Level
Beginner
Audience
Contributors, Designers/themers, Programmers
Keywords
IDE, sublimetext2
Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.