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

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

Re: Indent region with prefix


From: Giorgos Keramidas
Subject: Re: Indent region with prefix
Date: Thu, 17 Jan 2008 10:23:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (berkeley-unix)

On Wed, 16 Jan 2008 10:56:09 -0800 (PST), Chris L <Chris.Lott@gmail.com> wrote:
> If I have these lines:
>
> There once was a geek from Nantucket
> who counted his loops in a bucket.
> But then he found Perl,
> his hair started to curl,
> and his slide rule fell out of his pucket.
>
> And I want to transform them as quickly as possible to:
>
>> There once was a geek from Nantucket
>> who counted his loops in a bucket.
>> But then he found Perl,
>> his hair started to curl,
>> and his slide rule fell out of his pucket.
>
> What do I do? I'm not in Gnus or email mode, this is for Markdown
> text. Right now I am using a keyboard macro, but it seems like there
> should be a simple bit of magic to accomplish this, since it is so
> similar to commenting.

You already have a fair number of suggestions in this thread, but in
this case it's also simple to:

  1. Mark the region
  2. M-x replace-regexp RET ^ RET > SPC RET

The string-rectangle command is my favorite for anything more complex
than a simple regexp can do.

HTH,
Giorgos



reply via email to

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