Press Ctrl + v to enter into visual block mode.
Use ↑ / ↓ / j / k to select multiple lines.
Press Shift + i and start typing what you want.
After you press Esc, the text will be inserted into all the lines you selected.
Remember that Ctrl+c is not 100% equivalent to Esc and will not work in this situation!
There are slight variations of Shift + i that you can press while in visual block mode:
Key | Description |
---|---|
c or s | Delete selected block and enter insert mode |
C | Delete selected lines (from cursor until end) and enter insert mode |
R | Delete selected lines and enter insert mode |
A | Append to selected lines, with the column at the end of the first line |
Also note that pressing . after a visual block operation will repeat that operation where the cursor is!