sponsor Vim development Vim logo Vim Book Ad

FixCSS.vim : Add whitespace to junk CSS files

 script karma  Rating 0/0, Downloaded by 477  Comments, bugs, improvements  Vim wiki

created by
Daniel B
 
script type
utility
 
description
This function makes "junk" CSS (little or no whitespace) somewhat readable by adding newlines after '{', '}', and ';' characters. It also inserts a single space before every '{'.

Example of junk CSS: http://imgs.xkcd.com/s/c40a9f8.css
What it looks like after :Fixcss : https://gist.github.com/1155063

You can put the function in your .vimrc or save the script in .vim/scripts

Updated version: https://github.com/dbb/vim/raw/master/FixCSS.vim
 
install details
curl -O https://github.com/dbb/vim/raw/master/FixCSS.vim
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
FixCSS.vim 0.1 2011-08-18 7.0 Daniel B Initial upload
ip used for rating: 18.219.236.62

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github