(rarily needed) "invert line order"
Posted: Tue Apr 19, 2022 2:45 pm
Maybe it is rather trivial to implement, so I'll just mention it, although I don't need it often:
the feature to invert the order of all selected lines (or the entire document). If I have the lines 1, 2 and 3 in that order I want them to invert into 3, 2 and 1. If I have the lines Red, Yellow and Green I want them to invert into Green, Yellow and Red.
I cannot achieve this thru "sort", because sorting is bound to the content of the lines, whereas I don't want to invert the existing order. As a workaround I prepend every line with a sequential value (regexp replacement \i) to then sort the lines in descending order and remove those prefixes again. Not much of additional work either, tho.
the feature to invert the order of all selected lines (or the entire document). If I have the lines 1, 2 and 3 in that order I want them to invert into 3, 2 and 1. If I have the lines Red, Yellow and Green I want them to invert into Green, Yellow and Red.
I cannot achieve this thru "sort", because sorting is bound to the content of the lines, whereas I don't want to invert the existing order. As a workaround I prepend every line with a sequential value (regexp replacement \i) to then sort the lines in descending order and remove those prefixes again. Not much of additional work either, tho.