I started to use gvim, and I can\'t quite understand how the multiline edit works in gvim.
For example:
Original text:
asd asd asd asd asd;
asd a
I'm not sure what vim
is doing, but it is an interesting effect. The way you're describing what you want sounds more like how macros work (:help macro
). Something like this would do what you want with macros (starting in normal-mode):
qa
: Record macro to a
register.0w
: 0
goto start of line, w
jump one word.i"<Esc>
: Enter insert-mode, insert a "
and return to normal-mode.2e
: Jump to end of second word.a"<Esc>
: Append a "
.jq
Move to next line and end macro recording.Taken together: qa0wi"<Esc>2ea"<Esc>
Now you can execute the macro with @a
, repeat last macro with @@
. To apply to the rest of the file, do something like 99@a
which assumes you do not have more than 99 lines, macro execution will end when it reaches end of file.
Here is how to achieve what you want with visual-block-mode
(starting in normal mode):
visual-block-mode
, select the lines you want to affect, G
to go to the bottom of the file.I"<Esc>
."
..
will suffice.