An example:
Doe, John
And I want:
John Doe
I cut Doe
with D, and then 0 and then p
But what I get is this:
DJohn oe,
How to do this right?
An example:
Doe, John
And I want:
John Doe
I cut Doe
with D, and then 0 and then p
But what I get is this:
DJohn oe,
How to do this right?
Lowercase 'p' will paste AFTER the cursor. Use a capital 'P' and it will end up BEFORE the cursor. It will not, however, insert a space, so you will end up with "JohnDoe,".
Assuming you are on the "D", you may also dtJA,Ctrl+R, ", which will leave you with John Doe,
with the cursor at the end, to delete the rest.
An alternative would also be s/\v(\w+), (\w+)/\2 \1/