vim-comb is a vim bridge to csscomb.js, a coding style formatter for CSS (and its various pre-processors). csscomb.js replaces the deprecated csscomb.
You will need node installed so that this pluging can install a copy of csscomb.js, which is a node.js package. On Mac OS X with homebrew installed, you can get set up with:
brew install node
Add this to .vimrc:
Plug 'danhodos/vim-comb', {'do': './install.sh'}and run :PlugInstall
cd ~/.vim/bundle
git clone https://github.com/danhodos/vim-comb.git
vim-comb/install.sh
Because vim-comb is implemented using a formatexpr that is set for CSS (and CSS-like files, e.g. SCSS), you can use the standard gq with a motion (or after making a visual selection) to format your code through csscomb.js.
If csscomb.js returns an error (say, for instance, if you encounter this problem), then the error will be displayed without changing the contents of the buffer.
vim-comb will look for a file named .csscomb.json in your project directory. If it cannot find one, it will use a stock pre-defined configuration file.
The format of the .csscomb.json file is documented on the CSScomb site.
The vim portion of this plugin was originally based on that of vim-csscomb.