How to paste something at the end of the line in VIM

pastevim

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?

Best Answer

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.

Related Question