csscomb / sublime-csscomb

Sublime plugin for CSScomb—CSS coding style formatter
398 stars 61 forks source link

Sublime setting for combing only current block #5

Open kizu opened 10 years ago

kizu commented 10 years ago

After fixing csscomb/csscomb.js#177 we would have an ability to run CSSComb.js for any given block.

It would make sense to add an option (new action, key binding etc.) for handling only the current block, so running this action would comb only the block closest to the cursor.

The current action would be the default one, so it won't break anyone's workflow, but it could ease someone's work.

I can implement it if this is welcomed for this plugin.

tonyganch commented 10 years ago

I still don't see a use case, sorry.

kizu commented 10 years ago

I would like to add an option to Hayaku to run this exact action after expanding an abbreviation if CSSComb.js plugin is installed. So each new declaration would be placed in the proper place in the block. Even if CSSComb.js would be fast enough to run through the whole big stylesheet every time, I still don't understand why we should do this, when we can run it only for the blocks affected. It would be always faster than running through the whole file.

tonyganch commented 10 years ago

@kizu, okay, let's do this.

A note to future me: The issue was discussed with Vasiliy Bout in context of IDEA