CSS巨大的单行文件缩进不起作用 [英] CSS huge one-line file indentation doesn't work
本文介绍了CSS巨大的单行文件缩进不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图以一种明智的方式缩进此CSS文件.我的默认编辑器是VIM.我多次使用visual-select-all + =
尝试了,但没有工作,gg=G
也没有工作.
I am trying to indent in a sensible way this CSS file. My default editor is VIM. I tried multiple times using visual-select-all + =
, didn't work gg=G
didn't work either.
我尝试使用css.vim
,但仍然没有.有自动化的方法吗?
I have tried to use css.vim
but still nothing. Is there automated way to do this?
推荐答案
使用外部实用程序.
$ npm install cssbeautify
$ vim screen.css
:%!cssbeautify %
Presto!
之前
Presto!
before
之后
这篇关于CSS巨大的单行文件缩进不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文