sort within blocks

Started using style guides, one of which specifies that CSS declarations be listed alphabetically. Not sure what most people’s solutions to that is, but I’m just going to whack CSS in however and periodically run

vi{:sort

v - enter visual mode
i{ - select inside braces
: - enter command mode
sort - sort alphabetically

look at :help sort for other options, eg:

%sort! - reverse alphabetical
%sort u - sort and remove duplicate values
%sort n - sort numeric

etc

Comments

Popular posts from this blog

no sound in Papers Please

pdf to png/jpg/etc

Crunchbang Changes