Hey guys!

I was at work when a suggestion was made to order css rules in alphabetical order. Its quite easy to achieve with a short command.

:sort

This short command will reorder all lines within the file in alphabetical order.

In order to only order a select amount of lines, you’d just need to make a visual highlight to begin with, then run the command. This will mean that the following:

    border-top: 1px solid #ccc;
    text-align: center;
    padding: 20px 0;
    color: $pri;
    border-bottom: 1px solid #ccc;
    font-size: 30px;
    margin: 10px 0;

Reorders to:

    border-bottom: 1px solid #ccc;
    border-top: 1px solid #ccc;
    color: $pri;
    font-size: 30px;
    margin: 10px 0;
    padding: 20px 0;
    text-align: center;

I’ll probably create a quick binding for this at some point. However as it is, it is still very powerful.