On May 20, 10:09 pm, Jürgen Krämer <[email protected]> wrote:
> Vim only pastes as a block if it knows that the content of the register
> (and the clipboard is register "+") was yanked as block.
I'm not sure we're addressing the OP's requirement, but one can tell
Vim to make a register blockwise:
:call setreg('+','','ab')
Now a paste from the edit menu will be done as if vim yanked the
block.
If the OP is not pasting a block, say just a small bit of text, and
wants it repeated as if typed at the beginning of all lines of the
target block, then <c-r>+ or * can help. To use Brice's example:
Cursor on the first line, first column, I do <ctrl+V> (or Q for win),
jjj<shift>I (for insertion), <ctrl+R>+ and finally <esc>.
However, one needs to understand the * and + registers and (at least
some of) the 'clipboard' option; with my setting, which includes
"autoselect", just going into block mode means the block I've selected
in another window won't be pasted. I have to Edit|Copy in that other
window, to get it into the + register, or do the selection in the
other window after entering insert mode with <shift>I (then use <ctrl
+R>*). How it works with Windows I'm not sure.
Regards, John
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---