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
> 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
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
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
> 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
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
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