Numeric sort
:sort n
remove duplicate lines
:%sort u
Sorting IP addresses
:%sort n /\.\d\+\./
To adjust the indent on lines
V select lines
> indent
# block
Ctrl v
shift I
#
ESC ESC
replace sequences of spaces with a single tab
:'<,'>s/ \+/\t/g
:sort n
:%sort u
:%sort n /\.\d\+\./
V select lines
> indent
Ctrl v
shift I
#
ESC ESC
:'<,'>s/ \+/\t/g