Today I Learned

hashrocket A Hashrocket project

Vim Sort and Remove Duplicates

Today while rearranging a Ruby word array, I discovered this Vim command:

:sort u

This will sort all lines, or a given range, while also removing any duplicate lines.

Documentation

See More #vim TILs
Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.