Can I sort lines in vim depending on a part of line and not the complete line? e.g
My Name is Deus Deceit
I would like to sort depending on the column that the name starts + 6 columns for example sort by column 19-25 and vim will only check those characters for sorting. If it can be done without a plugin that would be great. ty
Check out :help :sort. The command takes an options {pattern} whose matched text is skipped (i.e. sorting happens after the match.
For example, to sort by column 19+ (see :help /\%c and the related regexp atoms):
:sort /.*\%19c/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With