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: David Golden
Subject: Re: Indent region with prefix
Date: Wed, 16 Jan 2008 20:17:08 +0000
User-agent: KNode/0.10.5

Chris L wrote:

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


Note that there is a full-featured markdown-mode for emacs which
provides blockquote formatting (C-c C-s b with region active):
http://jblevins.org/projects/markdown-mode/  
though I've never used it personally.


If you're just in Text mode, say, and not saying it's the best way, but
a very quick way to do it is:

Have a line containing "> ", place point just after. Hit "C-x ."   
(That's set-fill-prefix).

indent-region uses the fill-prefix if it's set, so now set the region 
to the lines you want prefixed,   and hit C-M-\    
(that's indent-region).   The indent will insert "> " for you.

That also means that you can M-x fill-region  (rewrap) the 
"> " prefixed text, and fill-region will keep the prefixes 
where they're supposed to be while fill-prefix is set.





reply via email to

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