Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 3 - SASS (scss) autocomplete variables from another files

I have two files:

variables.scss:

$my_var: #fff;

module.scss:

@import 'variables';

.body { background: $my_var;}

And Visual Studio provides me nice hints - when I'm typing $my in module.scss I see all variables from imported files that matches to $my. Simple.

But Sublime Text 3 autocompletes only variables from module.scss, not from other imported files. I have installed All Autocomplete package, it doesn't work... Any ideas? It is important feature for me...

like image 359
kzg Avatar asked Aug 04 '15 13:08

kzg


1 Answers

Question was answered here: Sass support for sublime text 3

From that link: You can install Emmet (formerly Zen Coding), it is an extremely powerful tool to do css (and scss), example :
I type bi and press tab and it gives me : background-image: url(|); (with the | your cursor).

If you are interested, please take a look at this:

  • Emmet for sublime, and all the abbreviation (Emmet is very good with HTML too -- look what is happening when you type, for example, nav>ul>li...)

Now, how to make it works with scss:

The answer is here

  • You have to install the package sass-textmate-bundle for scss and do what I have wrote.
  • If you need sass and not scss, check this answer, especially the second response from Alexander Ekdahl
like image 123
Marko Bajlovic Avatar answered Oct 07 '22 04:10

Marko Bajlovic