help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Column replace


From: deprecated
Subject: Re: Column replace
Date: Tue, 12 Jun 2007 17:37:03 -0000
User-agent: G2/1.0

Just in case anyone was worried that emacs has only two solutions to
this problem, there is a third way ..... :)

On Jun 12, 3:48 am, Enchanter <address@hidden> wrote:
> How to replace this?
>
> From:
>
> text ts
> text ts
> text ts
> text ts
> text ts
> text ts
> text ts
>
> to:
> text ts0
> text ts1
> text ts2
> text ts3
> text ts4
> text ts5
> text ts6
>

Turn on CUA mode (M-x cua-mode)

Move to the end of the first line and type C-return (cua-set-rectangle-
mark).

Now move to the end of the last line and type M-n (cua-sequence-
rectangle). You will be prompted for a starting value, an increment
and a format string.

[Only tested in emacs 22]

Cheers

Will





reply via email to

[Prev in Thread] Current Thread [Next in Thread]