Normal sorting
Highlight the text to sort, and the type:
:sort
If you don't highlight text or specify a range, the whole buffer is sorted.
Reverse sorting
:sort!
Case insensitive sorting
:sort i
Numerical sorting
Sort by the first number to appear on each line:
:sort n
Remove duplicates a...