Vim Reverse Sort
I use Vim's :sort
all the time. If I can't have a more meaningful algorithm than alphabetical, at least my lists are in some kind of order.
This function comes in surprisingly useful while writing GitHub-style checkbox lists.
- [x] Check mail
- [ ] Play guitar
- [x] Write TIL
Sorting this list alphabeticaly puts the undone items at the top.
- [ ] Play guitar
- [x] Check mail
- [x] Write TIL
Reverse the order (in classic Vim style) with a bang:
:sort!
Tweet