I believe the default behaviour in vi(m) for pasting (p) or (P) was to leave the cursor at the current position as before pasting, and in order to paste a register and have the cursor be at the end of the pasted text one would need to use the commands gp and gP respectively. I get only the latter behaviour, but I would like to have the former, what configuration options do I have to change for that?

  • 2
    Possible duplicate to stackoverflow: stackoverflow.com/questions/1587178/…. Afaik from vi.meta.stackexchange.com/questions/45/… this question should not be closed and get a new and better answer here. However, I do not know what better would be for this question and therefore I leave this to someone else. – Hotschke Jan 24 '19 at 12:34
  • My understanding: p and P leave the cursor on the last character of the pasted text. If lines are pasted, the cursor is on the first non-blank of the first of the pasted lines. Vim behaves like that and a descendant of the original Vi also. – Ralf Jan 24 '19 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.