Tip #194: Inserting text in multiple lines
tip karma |
Rating 327/105, Viewed by 4698
|
created: |
|
January 8, 2002 7:52 |
|
complexity: |
|
basic |
author: |
|
Gergely Kontra |
|
as of Vim: |
|
5.7 |
Do you know the I key in visual-block mode?
Suppose you have
let a=2
let b=3
let c=4
You want to make these variables script-wise. Then you move to over a, hit <C-v>, press jj and now press I.
You will be in insert mode before a
Now enter s:<Esc>, and when you press <Esc>, b and c will have the s: prefix too.
See |v_b_I|
Happy vimming!
Gergely Kontra
<<Insert the current filename at cursor postion. |
Switching between files >>
Additional Notes
|