7 ms·
My thoughts exactly about ':sort u'
by residualmind 6y ago
My thoughts exactly about ':sort u'
- lucb1e 6y agoThe 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
- ravoori 6y agoVim'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.