How to enable folding for LESS-files and save the foldings?

Hi,

I've created a LESS-file (it's a compiler for css-files). Unlinke PHP-files, I have no foldings. But when I click on the brackets, phpstorm is marking them. How I can enable foldings and save them?

8 comments
Comment actions Permalink

Hi Peter,

It is not yet implemented (it has to be done separately for each supported language/format) -- please watch/vote/comment etc : http://youtrack.jetbrains.net/issue/RUBY-8930?projectKey=RUBY

However, you can use custom folding right now (TBH, have not tested if it will remember it after restart):

  • Select the lines you want to fold
  • Code | Folding | Fold Selection / Remove Region (same action to fold and unfold)


It's not ideal (as you cannot quickly see what was folded) but at least something.

0
Comment actions Permalink

Is it posible to define, that phpstorm treats LESS files exactly like CSS files? The CSS-file treatment works very well, already. And if so: how I can exactly do that? :)

Changed

0
Comment actions Permalink
LESS files exactly like CSS files

Maybe it will be better to rename a file to *.css in this case?

In any case: try File | Settings | File Types -- move pattern from "LESS files" to "Cascading style sheets" (but you will loose all LESS-specific features, of course)

0
Comment actions Permalink

Sorry, I use PhpStorm 3 and I have no "File" > "Settings". "File" yes, but no "Settings". Please see my attached screenshot, for this matter.

settings.gif

0
Comment actions Permalink

File | Settings is for Windows/Linux.

For Mac -- I guess (since I'm not a Mac user) it should be PhpStorm | Preferences

0
Comment actions Permalink

OK, thanks. I'm on a Mac. At "Preferences" > "File Types" I've associated LESS-files to CSS and it looks good. The functionality is enchanced and I have good enough folding functionality.

0
Comment actions Permalink

The solution is good, but not perfect. I'm keen on the developments, which will improve LESS functionality. :)

0
Comment actions Permalink

RubyMine is the "home project" fort LESS, SASS & CoffeeScript.

Take a look at filed feature requets/bugs http://youtrack.jetbrains.net/issues/RUBY?q=%23Unresolved+less

Please also note that lot of changes are made in upcoming branch 112 (corresponds to PS/WS 3.5)
http://blog.jetbrains.com/ruby/2012/01/rubymine-4-0-beta-is-available-for-download/

0

Please sign in to leave a comment.