Wednesday, February 12, 2014

How to change the tab size for SASS/SCSS files in Aptana [HACK]

I found this today and it was really helpful:

I'm currently using Aptana to do all my php development and the default tab size for SASS files is set to 2. For myself, prefer a tab size of 4 for all source files I'm working on (html, php, js, css, sass, etc.) so I went up to Window > Preferences >Editors > SASS and changed to size setting to 4. Which worked nicely but to my surprise this setting does not save when you exit Aptana.

Currently, this is a small bug in Aptana issue tracker that they are working on, so for now we have this little hack that a user named Drew responded with in the thread.

Here is the post:

Although it’s a hack, you can solve the problem by going to your Workbench directory > .metadata > .plugins > org.eclipse.core.runtime > .settings > com.aptana.editor.sass.prefs (or any other file in this directory) and add a line at the end of the document with any text editor:
tabWidth=4
Also, make sure this line is at the top, and set to “false” (if it’s not there, add it): 1
 
com.aptana.editor.common.useGlobalDefaults=false
Save and close the file, and Aptana will remember the tab preference. However, this doesn’t resolve the issue that Aptana isn’t writing to the preference file in the first place.