What the fastest way to turn this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est laborum.
Into this:
> Lorem ipsum dolor sit amet, consectetur adipiscing elit,
>
> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
> ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
> ex ea commodo consequat. Duis aute irure dolor in reprehenderit
>
> in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
> sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
> mollit anim id est laborum.
With Gvim?
Go to the beginning of the first line and press ctrl+v to enter in visual block.
Scroll down until the last line and then press shift+i.
Now type the text you want and then press esc.
This should do the job. :)
One solution as already mentioned is search and replace but it forces you to think in command line mode io normal mode.
The most natural way for me is to think about how I would change one line in normal mode (I>
) and apply that to the whole file by using :%norm
This would be
:%norm I>
Perhaps not the shortest possible sequence but it doesn't interrupt my train of thought to much.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With