If my line looks like this:
abcdefghi
How can I reverse the selected characters (for example: from position 2 to position 6 (5 characters)) to get the result like this:
a(fedcb)ghi
And how can I yank, reverse and paste somewhere else to get the result like this:
abcdefghi(fedcb)
NB: parentheses used only for visualization.
You could use the
'revins'option to do this, as suggested here:If you want to paste it somewhere else, yank it as you otherwise do and use this “reverse paste” mapping: