Since <C-c> is supposed to act like <Esc> in most circumstances, one would expect that pressing <C-c> to end Insert mode during a visual block insert would prepend the text to all selected lines. In fact, This was the behavior in versions of Vim prior to vim7. As it currently stands, pressing <C-c> will only insert the text on the first line of the visually selected block unless the user has at some point setup a <C-c> vmap. Example:
vim -u NONE -N :insert foo bar baz . gg<C-v>jjIXX<C-c> This will only insert XX at the front of the first line. If we instead do the following, the XX will be inserted at the front of every line. vim -u NONE -N :vmap <C-c> <nop> :insert foo bar baz . gg<C-v>jjIXX<C-c> The presence of the <C-c> vmap isn't important. You can vunmap it immediately after. It's the mere act of defining a <C-c> vmap that causes <C-c> to act as expected. James -- GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
signature.asc
Description: Digital signature