CSS huge single line indent file not working

I am trying to indent in a reasonable way this CSS file . My default editor is VIM. I tried to use it several times visual-select-all + =, it didn’t work, it didn’t work gg=Geither.

I tried to use css.vim, but still nothing. An automatic way to do this?

+3
source share
3 answers

Use an external utility.

$ npm install cssbeautify
$ vim screen.css

:%!cssbeautify %

Presto!


before

pre

after

post

+5
source

Vim ; . vim, CSS . ( ) :

:%s/[{;}]/&\r/g

, @ , =:

:help 'equalprg'
+3

you can always try "online [whateveryouneed]" on google

http://www.lonniebest.com/FormatCSS/

hope it works

-1
source

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


All Articles