Background:
There are many great lessons and tricks for Vim, but itβs very difficult to find specific instructions on how to do some arbitrary thing that can be easily done in one familiar IDE text editor. Therefore, I ask for step-by-step instructions on how you will do something in Vim, that I already know how to do it in other text editors. I like Vim and a lot of built-in help and numerous online lessons, but sometimes a person has to break down and ask another person.
Question:
Suppose I have the following code in my file, how can I use Vim to switch from BEFORE, AFTER?
BEFORE:
Lorem ipsum dolor | sit amet, consectetur | adipisicing 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
AFTER:
Lorem ipsum dolor | sit amet, consectetur | adipisicing 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
Notes:
It would be nice to do this based on any arbitrary separator, not just a pipe character.
If you have not found a way to do this, but you know about the plug-in, this helps, but preference is given to someone who has a working solution that they used before
vim editor
dreftymac
source share