How to paste before the cursor after selecting a vertical block?
Generally, the P command (upper case, different from p) pastes the contents of the clipboard before the cursor position. Is that what you're looking for? (I'm not quite sure what you mean when you say you press Command+I, as my keyboard doesn't have a Command key.)
May seems late, but I faced the same problem.
e.g. A file having two lines:
foo
bar
- Press v: visual mode select foo in virtual mode
- Press y: copy
- Move the cursor to "b"ar
4-1. Press p => bfooar
4-2. Press P(Shift+P) => foobar Which is what I expected.
TLDR: Upper case P (shift + p)
I assume you mean using I
in visual block mode to insert the same text on multiple lines, where hitting p
simply pastes on the current line rather than all the selected lines.
In insert mode, you can hit C-r
followed by a register to insert the contents of that register, so if you wanted to paste the unnamed buffer, you'd enter
C-r"
Similarly, to paste from the clipboard
C-r*
By entering insert as you normally would, then using C-r
, you'll get the text on all of the selected lines.
Take a look at :h registers
to see what registers are available to you.