Wednesday, August 26, 2009

Re: inserting a column of &s into a text table for latex

On 2009-08-25, Joe wrote:
> Hi vimmers,
>
> I often have a text-table, which I need to format for latex by
> separating the column values with "&"s. Doing this by hand is really
> laborious and very slow. Is there a better way to do it?
>
> I know you can use | for going to a particular column but how could I
> use this to, for example insert a column of &'s from line 5,20 at column 12?
>
> Ideally I'd like to turn:
>
> a b c d
>
> (into)
>
> a & b & c & d

Not a solution to your problem but something else you may want to
check out is Dr. Chip's Align plugin,

http://vim.sourceforge.net/scripts/script.php?script_id=294

Once you have all the &s inserted in your table, you can select
those lines and execute

:'<,'>Align &

to vertically align all the &s.

Regards,
Gary

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments: