Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

kewah/vim-stylefmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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:

  • Manual installation:
    • Copy the files to your .vim/plugin directory
  • Pathogen
    • cd ~/.vim/bundle && git clone git://github.com/kewah/vim-stylefmt.git
  • Vundle
    • Add Plugin 'kewah/vim-stylefmt' to .vimrc
    • Run :PluginInstall
  • NeoBundle
    • Add NeoBundle 'kewah/vim-stylefmt' to .vimrc
    • Run :NeoBundleInstall
  • vim-plug
    • Add Plug 'kewah/vim-stylefmt' to .vimrc
    • Run :PlugInstall

Usage

In normal mode:

  • :Stylefmt: format the whole buffer.

In Visual mode:

  • :'<,'>StylefmtVisual: format the selected block.

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

About

Format your stylesheets using stylefmt inside Vim

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •