Nguyễn Linh Trang
New member
How do you insert multiple lines in vi?
Answer
vim Inserting text Insert text into multiple lines at once
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.
Answer
vim Inserting text Insert text into multiple lines at once
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.