how can i paste something on multiple lines?
i'm trying to achieve the same as: In an existing text, I can <C-v>jjjjj<S-I>HelloWorld<CR> to have HelloWorld inserted in 5-rows
but instead of typing HelloWorld I'd like to get the text from a register. i want to first yank HelloWorld then insert it in 5 lines.
Pasting over a block of text You can copy a block of text by pressing Ctrl-v (or Ctrl-q if you use Ctrl-v for paste), then moving the cursor to select, and pressing y to yank. Now you can move elsewhere and press p to paste the text after the cursor (or P to paste before).
Press Esc, and you'll see you have inserted a column of single spaces. Now use ctrl+v again to highlight the column of spaces. Use p to paste your original column selection.
Pasting in VimOnce you have selected text in Vim, no matter whether it is using the yank or the delete command, you can paste it in the wanted location. In Vim terminology, pasting is called putting and the function is utilized with the p command. Using this command pastes the selected text after the cursor.
When you are in insert mode, you can press Ctrl-R
followed by the letter for the buffer you wish to paste. Then just press Escape as usual and it will be block inserted as normal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With