From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ewen Cartwright" Newsgroups: gmane.emacs.help Subject: RE: Code alignment Date: Fri, 25 Aug 2006 15:28:06 +0100 Message-ID: References: <871wr4vrjv.fsf@lse.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1156522362 1911 80.91.229.2 (25 Aug 2006 16:12:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2006 16:12:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 25 18:12:41 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GGeIR-0002pT-I4 for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Aug 2006 18:12:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGeIQ-0002wg-Qi for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Aug 2006 12:12:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GGcfL-0004S3-CF for help-gnu-emacs@gnu.org; Fri, 25 Aug 2006 10:28:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GGcfK-0004Rq-PJ for help-gnu-emacs@gnu.org; Fri, 25 Aug 2006 10:28:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGcfK-0004Rn-Kx for help-gnu-emacs@gnu.org; Fri, 25 Aug 2006 10:28:10 -0400 Original-Received: from [195.153.172.7] (helo=mail.abcam.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GGcnd-0001AI-0Y for help-gnu-emacs@gnu.org; Fri, 25 Aug 2006 10:36:45 -0400 Content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: <871wr4vrjv.fsf@lse.ac.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Code alignment Thread-Index: AcbIT8GQRBhvcby5SyCzZg9aOnTDJQAArPMQ Original-To: "Jim Ottaway" X-Mailman-Approved-At: Fri, 25 Aug 2006 12:07:13 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36933 Archived-At: Great -- that's exactly what I was after -- thanks!=20 -----Original Message----- From: help-gnu-emacs-bounces+ejc=3Dabcam.com@gnu.org [mailto:help-gnu-emacs-bounces+ejc=3Dabcam.com@gnu.org] On Behalf Of Jim Ottaway Sent: 25 August 2006 15:06 To: help-gnu-emacs@gnu.org Subject: Re: Code alignment "Ewen Cartwright" writes: > Hi all, > > I'm a long-time vim user who is converting to emacs. One thing I miss=20 > from vim is a generic code alignment tool (like Align.vim, if anyone's > familiar with it) for formatting code like: > > > > > > as: > > > > > > As you may be able to tell, this is ColdFusion code, so natty C or=20 > Java-specific code-formatting tools won't help much -- I guess I'll=20 > need something completely language-agnostic as I doubt anyone has=20 > written anything specific to ColdFusion. > > If anyone knows of anything I could use in emacs to do this I'd be=20 > very grateful! You could try creating a ColdFusion mode and using M-x align. I tried this: (define-derived-mode cf-mode java-mode "CF") (push 'cf-mode align-c++-modes) and I got the alignment you want by marking the text and doing M-x align.=20 I know nothing at all about ColdFusion, so I don't know if java-mode is the right thing from which to derive a ColdFusion mode. All that really matters, however, is that you have a mode name that you can add to align-c++-modes.=20 Regards, -- Jim Ottaway _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs