Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am doing web development and most of my work is in the following:

Rails (the framework)
CakePHP (the framework)
AngularJS (the framework)
jQuery (the js library)

I realized I have basically the following 3 scenarios in my development work:

1) for CakePHP

  • use tabs for indentation
  • indentation width is 4 spaces

2) for php development

  • use spaces for indentation
  • indentation width is 4 spaces

3) for everything else

  • use spaces for indentation
  • indentation width is 2 spaces

I think what I want to do is set my user defaults to the 3rd one and have individual project settings.

I know how to set User settings in sublime 3.

Please advise.

share|improve this question

in your User settings, use

  "tab_size": 2,
  "translate_tabs_to_spaces": true,

in your CakePHP project settings, use

  "tab_size": 4,
  "translate_tabs_to_spaces": false,

in your everyday php project settings, use

  "tab_size": 4,
  "translate_tabs_to_spaces": true,

Project settings require you to save a project and the file generated is a JSON file usually named as project-name.sublime-project

share|improve this answer
You can also create a file called PHP.sublime-settings in your Sublime User package folder and put general PHP settings there. – shea Nov 30 '13 at 7:42
@bungeshea How do I change from default settings to this general PHP settings? – Kim Stacks Nov 30 '13 at 15:23
Sublime Text will automatically use the PHP settings when you open up a file with a PHP file extension, or mark a file as PHP through Set Syntax: PHP from the Command Palette – shea Nov 30 '13 at 21:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.