mutian / Sublime-CSS-Format

CSS Formatting for Sublime Text
http://mutian.github.io/Sublime-CSS-Format/
MIT License
98 stars 27 forks source link

is format css on save possible? #17

Closed chiefjester closed 10 years ago

chiefjester commented 10 years ago

We've moved to less and this is the only formatter that actually works. Now the only thing we need is invoke this whenever we save a less file. Thank you for making a wonderful plugin.

gkatsanos commented 10 years ago

Same request from here, would be lovely to have some automation (load css -> convert it to a specified default format -> save -> convert it to other format) We have some strict coding standards (expanded) that make working with long files difficult.. thanks !

mutian commented 10 years ago

Thank you for your advice. I've add the feature, format css on save, please update to the new version and refer to the readme doc. And the second advice, I prefer to use Grunt, you can use Grunt to config a complex automation process.

gkatsanos commented 10 years ago

Yes but would you run Grunt everytime you want to commit your local code to the Git repository?

mutian commented 10 years ago

CSS Format is just a formater, should not be a build system. Usually, we will edit code in the source mode, and publish a builded version, all the code will be commited to the repository.

gkatsanos commented 10 years ago

I know I know. I'm just asking what's the suggest method. I guess before committing I should use Grunt to convert my code to the common coding standard.

chiefjester commented 10 years ago

thanks @mutian works very well. The only caveat is interpolated variables which was posted here: https://github.com/mutian/Sublime-CSS-Format/issues/12