Created
April 18, 2010 14:35
-
-
Save yyfrankyy/370246 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" CSS Beauty | |
" 还原压缩过的CSS | |
" 给最后}加上; | |
:%s/;\@<!}/;}/g | |
" ;}{后加上换行 | |
:%s/[;}{]/&\r/g | |
" 干掉行前的空格 | |
:%s/^\s*//g | |
" 给样式行前面加上四个空格(以;结尾的行) | |
:%s/^.\{-};$/ &/g | |
" 每个样式块后多一行空格 | |
:%s/}/}\r/g | |
" { 前多一个空格 | |
:%s/[a-zA-Z]\@<={/ {/g | |
" 冒号后加上一个空格 | |
:%s/:\@<=\s*\(.\{-}\);$/ \1;/g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment