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

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

Re: Code alignment


From: Peter Dyballa
Subject: Re: Code alignment
Date: Fri, 25 Aug 2006 14:26:59 +0200


Am 25.08.2006 um 12:24 schrieb Ewen Cartwright:

formatting code like:

  <cfset var intSupplierID = 0>
  <cfset var structSupplierInfo = 0>
  <cfset var intAbID = getAbID(arguments.intStockID)>

as:

  <cfset var intSupplierID      = 0>
  <cfset var structSupplierInfo = 0>
  <cfset var intAbID            = getAbID(arguments.intStockID)>

One simple way to achieve 'right side alignment' works by positioning the equals sign in some column and continue to write. In the next line press TAB and the cursor should advance to the next column of the line above. I've used it in text-mode, but I cannot exactly remember whether it worked in programming modes. In some (shell for example) a TAB is mis-interpreted as positioning the left most word ...

This "fails" a bit when the line above has some words spread all over it, but in the end a few TABs lead to the look you wish to have.

--
Greetings

  Pete

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
                                               -- Rich Cook






reply via email to

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