On 2016-11-23 11:25, Jürgen Hestermann wrote:
> I am wondering how you can achieve this kind of code alignment

Yes, easily, because only lines 1 & 2 have TAB characters. Line 3 has no
TAB characters, so ET's algorithm doesn't need to do anything with it.
See attached screenshot.

Also remember, Object Pascal is not sensitive to whitespace (like some
other languages), so if need be, add blacks lines if you must. Often it
makes a method implementation easier to read too - separating related
tasks in a single method implementation. I do that, even when I don't
use ET. Also, if you want what things to be aligned when using an ET
enabled editor, then use spaces instead of a TAB character. Like any
programming style - make it work for you.

Elastic Tabstops will obviously not be a perfect fit for everybody -
nothing ever is. But (to me at least) it is a damn sight better than
anything before it. The pros far outweigh the cons for me. The pure joy
of multiple developers looking at the exact same file, but each
developer having their own style (indentation and padding) preferences
applied is a huge plus for me. Also in DDL SQL having field comments
perfectly align next to table fields is awesome. Also viewing TAB
delimited data dumps is awesome - giving text editors the ability to
view data like Excel or LibreOffice Calc.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other

Reply via email to