Tuesday, September 2, 2014

Inserting text in visual mode in vim

Steps:

1) Ctrl+v (takes you to visual mode)
2) up/down/left/right arrows to select location for inserting text.
3) Gto select all lines in the file
4) Actual commands for inserting: 'I' takes to insert mode
5) type the text you want to insert. It gets inserted in the first line
6) hit Esc. the inserting done in all the lines you selected.

No comments: