I'm a web developer and I often have to write CSS:
I always sort the styling alphabetically so this:
.sorted_product_mens_color_list li, .sorted_product_womens_color_list li {
margin: 0 5px 0 5px;
padding: 5px;
border: 2px solid black;
}
turns into:
.sorted_product_mens_color_list li, .sorted_product_womens_color_list li {
border: 2px solid black;
margin: 0 5px 0 5px;
padding: 5px;
}
However, this gets repetitive and I want to just automate it by writing a script that does this in VIM.
How would I either 1) run :sort
in a loop within a file within all curly braces or
2) Run that in all CSS files in a directory? (either one)