Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I paste some text that I yanked at the end of the line? Currently I'm doing it by pressing $p. Is there any way to do this with a single keystroke?

share|improve this question

2 Answers 2

up vote 14 down vote accepted

There is if you create a mapping, e.g..

:nmap , $p

Then you can type , to paste at the end of the line.

Remember, one way or another, you'd have to tell Vim that you want the text at the end of the line, and not where the cursor currently is; by default, Vim has no single key-stroke for this.

share|improve this answer

A couple more keystrokes, but will allow you to position the text or add other content before pasting:


<position the cursor where you would like to paste the text>


Explanation: Ctrl+r inserts the contents of a register. " is the unnamed register, containing the text of the last delete or yank.

I find myself doing this a lot when pasting comments. :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.