11

I'm using Aptana Studio 3 and I'd like to get the code assist feature to work for Sass (.scss) files. It's OK if code assist doesn't work for Sass syntax/declarations, but I'd like to get syntax highlighting and code completion help for standard CSS declarations. So for example if I type in "background" I'd like the editor to display the syntax like it does for HTML.

I've added a new File Association Preference for .scss files (from here: https://wiki.appcelerator.org/display/tis/Changing+your+file+association+preferences), and assigned the CSS Editor as the default editor for .scss files. This gets me syntax highlighting, but no code completion help for CSS rules.

Am I doing something wrong or am I just out of luck for getting code completion/code assist help?

KatieK
  • 13,586
  • 17
  • 76
  • 90
North Krimsly
  • 879
  • 4
  • 18
  • 33

3 Answers3

7

this^ for those who haven't done it already go to: preferences > general > Editors> File Associations in filetypes select sass (and scss), click add, choose css source editor, add it. then select the css source editor in the associated editors box and click default. after doing that- get frustrated and google code completion sass aptana studio like we did and then post the solution if you find it or upvote so someone finds out.

Andrew Luhring
  • 1,762
  • 1
  • 16
  • 37
  • Has anyone made any progress on this? I've been trying to figure out how to just copy the css editors' code completion file over to the sass editors; but I can't seem to figure out where those files are... – Andrew Luhring Apr 11 '13 at 23:03
1

For anyone interested in using the default CSS editor for SASS as well. Do this.

Go to: Window > Preferences > General > Editors> File Associations. In the "File types", choose "*.scss". Then add the CSS Source Editor in "Associated editors" and make it default. Although I like the theme of the default SASS Source Editor.

And yes, as expected, this will give access to the auto-complete and all other features of the CSS Editor.

Humming
  • 453
  • 4
  • 15
  • My problem now is that it's annoying to get the css errors because css doesn't support the selector within selector syntax thing. Where my aptana people at?? This can't be that difficult we just want to copy paste one feature into another editor. – Andrew Luhring Apr 17 '13 at 16:33
  • No such problem for me, I can nest without any error. Make sure your file extension is `.css.scss` – Humming Apr 19 '13 at 07:17
  • wait what do you mean my file extension should be .css.scss... do you mean style.css should originally be style.css.scss before sass compiles it?? – Andrew Luhring Apr 21 '13 at 01:32
  • Adding the .scss extension after .css will allow it to consider both css and scss features. Like we have .html.erb or .js.erb – Humming Apr 22 '13 at 16:49
0

(answer taken from the comments- props/shout-out go to @Humming )

My problem now is that it's annoying to get the css errors because css doesn't support the selector within selector syntax thing. -Andrew Luhring

No such problem for me, I can nest without any error. Make sure your file extension is .css.scss -Humming

wait what do you mean my file extension should be .css.scss... do you mean style.css should originally be style.css.scss before sass compiles it?? – Andrew Luhring

Adding the .scss extension after .css will allow it to consider both css and scss features. Like we have .html.erb or .js.erb – Humming

Andrew Luhring
  • 1,762
  • 1
  • 16
  • 37