Home

Awesome

vim-stylefmt

Format your stylesheets using stylefmt inside Vim. Stylefmt supports the latest CSS syntax and understands CSS-like syntax such as SCSS, Stylus and Less.

This plugin is heavily inspired by vim-esformatter.

Installation

First you need to install stylefmt (make sure you have Node.js installed):

npm install -g stylefmt

Then install the plugin:

Usage

In normal mode:

In Visual mode:

Or by mapping the commands in your .vimrc:

nnoremap <silent> <leader>cs :Stylefmt<CR>
vnoremap <silent> <leader>cs :StylefmtVisual<CR>

License

Released under the wtfpl license