CSS format with VIM, as in Textmate

TextMate has this awesome option "Format CSS" and "Format CSS Compression." This option does not seem to exist in vim. Perhaps this is in a plugin that I don't know about? Or maybe I need to integrate CSS Tidy somehow?

+3
source share
1 answer

You can easily integrate CSS Tidy. Since you came from TextMate, I assume you are on a Mac. If you don't already have CSS installed, I would recommend installing it through a package manager, such as the excellent Homebrew .

Vim CSS tidy =, , ~/.vimrc:

autocmd filetype css setlocal equalprg=csstidy\ -\ --silent=true 

, CSS, CSS Tidy, =. CSS gg=G .

CSS Tidy , , , , ~/.vimrc \.

+14

Source: https://habr.com/ru/post/1759590/


All Articles