Reputation: 780
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...
Upvotes: 5
Views: 4145
Reputation: 1622
I got this working using the AllAutocomplete plugin
The biggest drawback to using this plugin is that the file that it reads the variables from has to be open. Unfortunately I haven't found any better way to achieve this.
This plugin didn't work for me out of the box with ST3. I had to make a small modification to the user settings file to get it to work.
"word_separators": "./\\()\"':,.;<>~!@#%^&*|+=[]{}`~?",
Adding this to your user sublime settings file should do the trick. Here is the github issue where this originated from.
https://github.com/alienhard/SublimeAllAutocomplete/issues/18
Upvotes: 0
Reputation: 1135
I had the same issue. This is what fixed the problem for me:
Preferences > Settings - More > Syntax Specific - User
"word_separators": "./\\()\"':,.;<>~!@#%^&*|+=[]{}`~?"
Hope it helps. There is this github issue if you want to have more information.
Upvotes: 0
Reputation: 323
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:
nav>ul>li
...)Now, how to make it works with scss:
The answer is here
Upvotes: 1