Sublime Forum

Newbie question

#1

Need to be pointed in the right direction…

On Mac OSX, using Ruby on Rails and just started using Sublime 2. Can’t figure out simple stuff like:

  • auto closure of HTML and embedded ruby (.erb) brackets, or
  • color hiliting of Sass files…

Is there some special setup I need to perform?
I am pretty new to programming so any help is appreciated.

Dave

0 Likes

#2

This link could work as a SASS syntax highlighter. Copy/paste into a Packages/SASS/SASS.tmLanguage file within the Sublime directory. It might require some tweaking, but in general Sublime can use TextMate’s syntax highlighters. Of course, you’ll also need a color scheme that supports it.

0 Likes

#3

Thanks, I’ll try it!

0 Likes

#4

OK, created the file SASS.tmLanguage in newly created SASS folder. Is there something else I have to do? Nothing has changed when I open the css.scss stylesheets in rails???

Dave

0 Likes

#5

The link I provided has this line:

fileTypes = ( 'sass' );

Looks like you should add:

fileTypes = ( 'sass', 'scss');

Also, I should have mentioned that the file is in JSON currently and ST2 expects XML. You can use AAAPackageDev to make this easier. The readme there explains how to do the conversion.

Last, you’ll need a color scheme that supports the SASS scopes defined in the SASS.tmLanguage file you created.

0 Likes