Vim step-by-step: How do you line up arbitrary text by arbitrary delimiter?
Posted
by dreftymac
on Stack Overflow
See other posts from Stack Overflow
or by dreftymac
Published on 2010-05-27T17:59:21Z
Indexed on
2010/05/27
18:01 UTC
Read the original article
Hit count: 287
Background:
There are a lot of great tutorials and "tricks" pages for Vim, but one thing that is very difficult is to find specific instructions on how to do some arbitrary thing that one can easily do in one's own familiar text editor IDE. Therefore I am asking for step by step instructions on how you I would do something in Vim that I already know how to do in other text editors. I like Vim and the great built-in help and numerous on-line tutorials, but sometimes a human has to break down and ask another human.
Question:
Suppose I have the following code in my file, how can I use Vim to get from BEFORE, to 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
© Stack Overflow or respective owner