Let's say I have some text:
ipsum
ipsum dolor
ipsum dolor sit
I want to add the word "Lorem" in front of each line.
Loremipsum
Loremipsum dolor
Loremipsum dolor sit
I can do this by:
- Entering visual block mode at the first line,
- Going down 2 lines
- Entering insert mode with
Shift-I - Typing
Lorem - Exit insert mode (with Esc)
It will indeed put "Lorem" in front of each line but only after exiting insert mode.
I would like for multiple cursors to appear, and whatever I type would appear on all three lines, not just the top one.
Is this possible with Vim or a plugin?
v2j:s/^/Lorem(the first bitv2jcan be replaced by your favorite way to enter a range for that chunk of text),v2j:norm! ILorem,ILorem <esc>j.j., etc.:[range]normal! .is also really powerful. – D. Ben Knoble Aug 28 '22 at 03:13