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

2009-08-26 Thread Gary Johnson
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

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

2009-08-26 Thread Tim Chase
> Tim, sometimes I have tabs between the data and sometimes, white spaces, > it changes. Then you should be able to use the :'<,'>s/\s\+/ \& /g to search for one-or-more whitespace characters (spaces or tabs) and replace them with "space space literal-ampersand space space". Adjust the

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

2009-08-26 Thread Joe
Thanks for all the tips, I had an internet outage today, but I'll follow up on these ideas. Tim, sometimes I have tabs between the data and sometimes, white spaces, it changes. Bastiaan wrote: > also you can use the . (dot) the repeat the action I guess > > but I would do it like this: > Sele

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

2009-08-25 Thread Bastiaan
also you can use the . (dot) the repeat the action I guess but I would do it like this: Select the table shift-v9 asuming you have 10 rows Then hit : and type s:\s\s: \& :g done Cheers Jason Axelson schreef: > On Tue, Aug 25, 2009 at 1:41 AM, Joe wrote: > > Ideally I'd like to turn: > > > > a

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

2009-08-25 Thread Tim Chase
> 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 exampl

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

2009-08-25 Thread Jason Axelson
On Tue, Aug 25, 2009 at 1:41 AM, Joe wrote: > Ideally I'd like to turn: > > a  b  c  d > > (into) > > a       &       b       &       c       &       d This sounds like a good job for macros. So something like this (with cursor starting on the a and assuming the columns are identical): qqa

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

2009-08-25 Thread Joe
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 examp