I come about this regularly and still do it manually. Consider this example - say it's inside a text.
first 3,2,17,198,232,1,999 and some other text
second 1,2,3,71,98,4,5 and some more text
I need these values sorted (usually for easier read, or to find duplicates).
e.g.
first 1,2,3,17,198,232,999 and some other text
second 1,2,3,4,5,71,98 and some more text
So far I always do it the "pedestrian" way - in my head where possible, or yank out sort there and paste back. I keep thinking there should be a more efficient way in vim. (I also tried splitting those into lines, sort -n
, join, adjust commas,... - but this was even less efficient.)
Preferable without needing me to install a plugin as I sometimes work on other machines.