[Lazarus] Elastic Tabstop - what would the bounty be worth?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Tue Jan 12 16:47:55 CET 2016


Hi,

If I was to create a bounty to have this implemented in Lazarus (and
hopefully somebody has the skill and time to implement it), what would
the cost be? I'll be funding this personally as Elastic Tabstop support
has been on my Lazarus wishlist for years. The algorithm of Elastic
Tabstops is pretty simple, I just don't know what would be involved in
modifying Lazarus's TSynEdit component to support this.


Some Elastic Tabstops (ET for short) background:

Elastic Tabstops homepage:
  http://nickgravgaard.com/elastic-tabstops/

Visual Studio add-on:
  https://www.alwaysaligned.net/
  This also shows a nice animated image of what ET does to source code

jEdit, Gnome's gEdit etc also support ET.

ET is a replacement for TAB and Space indentation. It is a age old
argument which I don't want to go into here... All I can say is that ET
is in my personal opinion by far the best option of the lot. jEdit has
been supporting it for years, and it is immensely useful with source
code, CSV files, SQL, XML etc. I've personally used jEdit with ET
enabled for almost a year now, and it rocks!

Basically ET's representation of a tabstop is similar to that found in a
word processor (eg: MS Office, LibreOffice). The size of the Tab can
vary. On the flip side, programmer editors and IDE's often hard-code a
Tab size to a set number of spaces, and this size is applied everywhere.
Programmer editors in turn also limit you to only using monospace fonts.
With ET, the code is grouped into columns and each column can have a
variable Tab size (normally defined in pixels).

It has many benefits like using variable width fonts and still keeping
code perfectly aligned or indented. It makes reading column data like
CSV or SQL files very easy. Because it normally uses a single Tab to
indent or align code, the file size is reduced too - not sure if this
helps with compiler parsing speed. End-users can configure the threshold
and the amount of indentation (in pixels) so if you are a 2-space indent
guy, with ET you can still make your code look identical to what it was
before. If you like a bigger indentation, configure it with a larger
indent - the source code number of TAB characters will still stay the
same regardless, so different settings per developer doesn't cause
source code repository whitespace diffs (unlike Space or static TAB
indentation does).

More feature complete ET implementations also support converting Space
indentation files to/from ET. But I'm not really interested in this
ability for the bounty. Gnome's gEdit had ET plugins that showed this
ability and it actually worked pretty well though. I'll be doing a once
off conversion of my source code to ET style indentation and then keep
it like that.

You are welcome to read the ET homepage for further information (I
suggestion you do, if you are interested in this bounty). I even
recommend you download the Java .jar file which implements a mini editor
with ET support so you can try it yourself, or run jEdit and enable ET
support in the settings.


So for those knowledgeable of TSynEdit, how much effort would it be to
implement Elastic Tabstop support in Lazarus IDE, and what would be your
estimated cost? Hopefully I can afford the cost, because I would really
love ET support in Lazarus. ;-) The resulting implementation would
obviously be shared back to the Lazarus project and hopefully get
accepted in the repository.

You can reply here in the mailing list, or reply in private if you want.
If you need any more information, just let me know.

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




More information about the Lazarus mailing list