On May 11, 2:05 pm, Ben Schmidt wrote: > > Now for some solutions: > > > a) use<C-R>+ to paste: this works but lines of formatted text > > usually ends up being a complete mess afterwards (the indentation > > changes) > > > b) use<C-R><C-O>+ to paste: this fixes 1 but not 2, formatting is ok > > though > > > c) use<C-O>:set paste<CR><C-R>+<C-O>:set nopaste<CR> > > this seems to fix all situations > > > Does anybody have any comments on (c)? Improvements? > > > Why is (c) not the default for pasting in all GUIs? Or something > > similar...? > > Yeah, I think (c) is the correct solution, though, to be honest, I think > (a) has advantages in many situations, too, where you *want* Vim to > format the text as it is pasted.
In theory, yes. However, it seems Vim always mucks up the formatting when pasting. For me it almost always indents every line one extra shift width for each new line resulting in a "staircase" of lines. Unfortunately, there is a problem even with (c). Namely, if you're in block-wise visual mode and hit I to insert, then <C-O> does nothing. You have to press <C-O><C-O> for some reason. This seems like a bug to me. (Of course, <C-O> works fine if insert mode wasn't entered from block-wise visual mode.) Is this a bug with <C-O> and visual block mode? Björn -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
