Trier et dédupliquer des lignes dans vim. Supprimer les doublons.
:%sort (1)
:%sort u (2)
:%sort! (3)
:%!sort -u (4)
1 | sort all the lines in lexicographical order (a-z) ; other ranges can replace the % , like <> for the current visual selection |
2 | sort all lines and undup (remove duplicate lines) |
3 | sort in reverse order, an equivalent with external command is :%!tac |
4 | sort using an external sort command |