Visual block mode (which you can enter with CTRL-V) is perfect for this kind of usage. You can copy and paste squares much like your router boxes and you can do so without shifting columns.
Here is an example working with your initial diagram.
Start by using a visual selection to copy the first router on the top left corner. First move to the upper left +, ...
Doing it quick and dirty:
Select first column as V-BLOCK. Then press 40I<space><esc>, where "40" is number of spaces you want to add to center the picture.
Or you can use :h v_> to shift by any number of shiftwidth() to the right.
I tend to like using :normal with a range for this kind of edit.
Using :normal with a range is often similar to using a macro, but it can be more convenient in cases when:
You want a single modification per line. (A macro can be more flexible in selecting what to modify.)
You can express the whole command using only alpha-numeric characters (no need to ...
This is a good point to highlight a shortcoming of P (or the equivalent p) in Visual Block mode (more generally, in Visual mode.) It replaces the selected text, so it's not a great fit for this use case.
While you can work around it, perhaps a more straightforward alternative would be to use Visual-block Insert and then use Ctrl+R to insert the contents of ...
Wow, actually it's easier than I thought!
:h v_p reads
The previously selected text is put in the unnamed register.
therefore probably the best way to do what I want is Ctrl-V3jPp, or even Ctrl-V3jpp (because P and p seem to do the same in block-visual mode), where the latter p puts back what the former p deleted, right at the place it is needed.
Would it be possible to try it with a macro?
Perform your yank command as you first describe (0y$).
Move the cursor to the first period where you want to "put" the yanked line.
Press q and then another key to store the macro (e.g. push q again)
Press P and then j for the macro keys.
Press q again to stop the macro recording.
For the rest of the ...
I don't think there is a built-in way to achieve what you want to do, so I decided to try to implement it by myself. I got a working solution but this kind of text manipulation has a ton of corner cases and they are most probably not handled by my solution. Hopefully that will give you some inspiration to code your own (better) solution. Also there might ...
Here's a programmatic way of doing it. It's a bit complicated, but it only took me 5 minutes of trial and error to get right :)
Here's the start:
The key is to try to :join the matching lines with a :global command. We can do a touch up of the ordering and such later.
A first attempt might ...
Not sure if you can avoid extra blanks...
I would do it this way:
select /subdir/ and other dirs with <C-v> + motion
go to /path's and paste befor ;
select para and remove spaces with vip:norm! f diw
There probably might be a better way with or without plugins, idk.
PS, ofc the last command that deletes the spaces should depend on what you ...
There is no simple way to do it (considering all edge cases).
You can try remapping solution:
nnoremap <C-v> :setl nf+=alpha<CR><C-v>
nnoremap v :setl nf+=alpha<CR>v
nnoremap V :setl nf+=alpha<CR>V
xnoremap <C-a> <C-a>:setl nf-=alpha<CR>
xnoremap <C-x> <C-x>:setl nf-=alpha<CR>