I work a lot with visual block mode, which I find really useful for quick changes across a lot of lines.
But something I'm struggling to do is inserting a newline like so:
Selection is noted as []
:
Some [t]ext
Some [t]ext
Some [t]ext
Some [t]ext
Some [t]ext
I press I
and I can add some text to be inserted before the t
:
Some other text
Some [t]ext
Some [t]ext
Some [t]ext
Some [t]ext
When I press <Esc>
I get the following:
Some other text
Some other text
Some other text
Some other text
Some other text
But now if I press <CR>
instead of the text I want to add, the newline is inserted as desired but not for the other lines. The result is the following:
Some
text
Some text
Some text
Some text
Some text
Do you know why this isn't working?
Note: since it works for c
and r
I'm not sure why is this not working...
I
andA
in visual block mode just don't allow that. I think this is implied by "Works only for adding text to a line, not for deletions." under:help v_b_i
because that newline a) removed text from the line so it's akin to a "deletion" and b) it changed the number of lines in the selection. But it probably deserves more explanation.