Skip to main content

All Questions

Tagged with
0 votes
1 answer
1k views

how to copy all code in vim with invalid register name?

I'm trying to select all the code in my vim editor in a putty session on my windows 10 and paste it on notepad in windows 10. once I get into vim with terminal command vim code.s on ubuntu I've tried ...
rongfiggs1999's user avatar
2 votes
3 answers
2k views

Automatically change to paste mode when pasting from clipboard

As far as I know, there is no autocmd event for copying and pasting. So I was curious if it is possible to write a script that toggles paste mode when the clipboard is used for paste. If it can handle ...
Forethinker's user avatar
56 votes
4 answers
42k views

Vim: how to paste a block of text at the end of multiple lines?

Say I have a block of text like this: // Comment1 // Comment2 // Comment3 And I want to append each of these lines to the end of 3 corresponding lines of code: foo = 1; bar = 2; baz = 3; So that ...
Tim's user avatar
  • 671
44 votes
2 answers
22k views

How can I paste something at the end of the line in VIM?

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?
Nathan Fellman's user avatar