Monday, January 7, 2013

Re: column alignment ?

There are plugins to help: Tabularize is the one I use.  So assuming the larger spaces were \t characters (actual tabs), it'd be :Tabularize /\t

If they are really spaces, you can get clever with a search/replace before calling the plugin. Something like  s/\s+/ - / (replace multiple spaces with a dash). Then :Tabularize /- to organize on that dash. Then you can use column edit mode (ctrl-v) to delete the dash you no longer need.

I'm sure you can do it in other more clever ways, but that's how I'd get it done.



On Mon, Jan 7, 2013 at 10:00 AM, stosss <stosss@gmail.com> wrote:
I start out with this:

text    text
more text    more text
still more text    still more text

I want to end up with this:

text                   text
more text          more text
still more text    still more text

I have no idea what help to look for or if this is even possible
except for doing it manually. Is there a way to use a specific column
on each line to accomplish this with maybe a s/search/replace/ ?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: