Sublime Forum

CSS Class, LESS Variable completion

#1

I installed the latest Sublime Text build on a Mac running 10.8
Through Package Installer I installed the LESS syntax. However, now sublime text has stopped suggesting completions for my defined class/id names and LESS variables. I say it has stopped now, because I have not run into this issue on other computers.

Is there a setting for this? Or does Sublime Text 2 handle these kinds of completions differently?

Thanks!

UPDATE: Solved

I found the solution here: github.com/danro/LESS-sublime/issues/9
It seems that after build 2203 some CSS completions have been introduced that override/block custom variable completion.
(on mac) Go to:
~/Library/Application Support/Sublime Text 2/Packages/CSS
and remove/move:

css_completions.py
css_completions.pyc

And voila, you have custom variable completions back in LESS. You lose some new CSS stuff of course…so there ought to be a better solution out there.

0 Likes

#2

+1 on this issue.

I’m having the same issue - when Set Syntax is in CSS mode - all is fine with suggestions, switch to Less Syntax mode and Sublime will hint for the keyword but not the value…

0 Likes

#3

This totally cripples completion of basic css selectors, like line-height, border-top, etc. Though it does indeed add the autocompletion back for .less files.

Any further resolution to this issue? I just started working with sublime, and having to choose between .less and straight .css syntax completion—when I’ve got active projects using both—is maybe a deal breaker for me :frowning:

0 Likes

#4

List Stylesheet Variables plugin works well:
https://packagecontrol.io/packages/List%20stylesheet%20variables

0 Likes