16

I was looking for a way to edit multiple line simultaneously.

I found that Ctrl-V + selecting the lines + I should be the solution. The problem is that, for me, after pressing I (in fact Shift-i) I'm switching to the classic single line insertion mode on the first line of my selection.

Why is that? Is there an option to set in my .vimrc?

I'm using vim 7.3 with the +visualextra option enabled (I saw somewhere it was required).

1 Answer 1

17

Have you tried it? Vim does not update all columns at once, only the first one. When you conclude the edit with Esc, all the other lines magically are filled with the same text.

Also note that on Windows, you often need to actually use <C-Q> instead of <C-V>, which is mapped to paste the clipboard.

Protip: In blockwise visual mode, you can also change text, or (if you extend the selection with $), Append with a non-aligned right text border.

2
  • Or replace text.
    – romainl
    Jan 22, 2013 at 10:52
  • Ok, my bad, I was expecting to see the change on all the lines while typing. It's working fine.
    – gregseth
    Jan 22, 2013 at 11:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .