TIL - sort in vim

Posted by Marcus Folkesson on Thursday, November 2, 2023

TIL - Sort in VIM

TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post

After 15+ years of daily VIM usage I just discovered the :sort function. Quite embarassing.

/media/vimsort.gif

It is also possible to sort in revese ( :sort!) and remove duplicate lines ( :sort u).