Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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).

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
Or replace text. –  romainl Jan 22 '13 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 '13 at 11:32
    
Thanks a lot! I was having problems with <C-V> –  gosukiwi Mar 1 '13 at 17:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.