Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Thank you, $p is already better than A<esc>p that I was currently using. – 79E09796 Oct 20 '15 at 20:09
up vote 17 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .