Often I just want to sort all my #include\'s at the top of my source and header files by their length.
#include
vim allows me to sort alphanumerical
vim
One way to do this in vim is by filtering the visual selection with awk's length() function before sorting. For example:
:'<,'> ! awk '{ print length(), $0 | "sort -n | cut -d\\ -f2-" }'