[Top][All Lists]

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

Re: Fancier align-regexp?

From: Scott Frazer
Subject: Re: Fancier align-regexp?
Date: Tue, 13 Jan 2009 09:57:09 -0500
User-agent: Thunderbird (Windows/20081209)

jrwats wrote:
Lorem ipsum dolor: sit amet
consectetur: adipiscing elit. Etiam
sed purus: Vestibulum
ante: ipsum
primis in: faucibus

You'll have to paste the following into emacs I'm afraid (or set your
browser to monospace font?) to get this to look 1/2 decent.

I want (the colons aligned with the words preceding them "following"
the colon to the aligned point)
 Internet IP Address:
         Subnet Mask:
     Default Gateway:

calling align-regexp on ":" doesn't work obviously and puts the spaces
between the words preceding the colon:
rem ipsum dolor : sit amet
consectetur       : adipiscing elit. Etiam
sed purus         : Vestibulum
ante              : ipsum
primis in         : faucibus

I know align-regexp has a fancier method to use with a prefix arg, but
I'm not smart enough for it.  Is it possible to accomplish this with
align-regexp?  A macro?

C-u M-x align-regexp \(\s-*.+\): -1 1 n

reply via email to

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