Sort comma separated list without parenthesis
This could be done
- via selection
- from the cursor up to specific char.
For instance I would like to sort people in markdown table:
|...| ...| Simone, Dean, Jane, Ana | ... |
In this case I could select entire cell and gs, or not select anything but gs,|. The end char cold even be specified in some array, i.e. let stopchars = '()|[]{}-' in which case above example becomes only gs,. Even , can be dynamic for instance gs- to sort Simone - Dean - Jane - Ana
Hey @majkinetor, this is an interesting idea. Thanks for sharing! From an implementation standpoint I think we'd need to limit to commas (although we could have alt mappings for other delimiters), but gst] for sorting until ] makes sense to me.
I don't have a ton of need for this, but feel free to take a stab at implementing if you're interesting and I'll be happy to review.
Normal Vim philosophy is to use the f and t movements. In you case place the cursor at the first item and then gst| should just work. This is how all other vim motion commands work when dealing with non brackets/quotes.