News for hackers. Stuff that matters.
Re:A Vim Guide for Advanced Users by residualmind on Saturday February 27, 2021 @12:40PM (#26286495)
My thoughts exactly about ':sort u'
Re:A Vim Guide for Advanced Users by lucb1e on Saturday February 27, 2021 @04:47PM (#26288474)
The u option making it keep only unique lines, for anyone else left wondering.

Personally, instead of re-learning how to do stuff with vim-sepecific commands, I just use the existing command line tool, especially since I don't do this on a daily/weekly basis (but I use sort in command line pipes at least weekly). The command is literally "sort" and for unique you just pass the -u flag, e.g. select something in Vim and type :!sort -u

Re:A Vim Guide for Advanced Users by ravoori on Saturday February 27, 2021 @05:57PM (#26288950)
Vim's sort is handy on Windows where the option to shell out usually doesn't exist. Additionally you have the full power of Vim regex to sort on subsets of lines.
Re:A Vim Guide for Advanced Users by gnubison on Saturday February 27, 2021 @10:19PM (#26290386)
On the other hand, the :! and ! commands are Vi compatible (though, as you say, you wouldn't get the additional features of :sort). So you get to pick who you're going to be compatible with: vi or Windows?
Re:A Vim Guide for Advanced Users by lucb1e on Monday March 01, 2021 @12:13PM (#26305123)
I can also do a subset of lines in the way I described, actually