Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set tab with to 2 spaces in ruby and 4 spaces in javascript with sublime text

Tags:

sublimetext

Pretty self explanatory, I just want to set up sublime to use 2 space indents for everything other than javascript

like image 355
Greg Guida Avatar asked Mar 14 '12 23:03

Greg Guida


1 Answers

The accepted answer is unnecessarily complicated. Just open a Ruby file in Sublime Text 2, then:

Preferences -> Settings - More -> Syntax Specific - User

This will create a new file called Ruby.sublime-settings in the Packages/User directory and open it for you. If the file already exists it will just be opened for editing. Now you just need to type in your preferred settings and save.

like image 154
Hubro Avatar answered Oct 12 '22 10:10

Hubro