Forum > Jobs

Elastic Tabstops - what would the bounty be worth?

(1/5) > >>


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:

Visual Studio add-on:
  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.

  - Graeme -


Did you ever get a response (obviously not on this forum).  I have no knowledge of the SynEdit component, but this looks interesting and I wondered if someone was going to implement it.

Also, does your fpGUI toolkit support it with the memo component?  I might switch to fpGUI just for that feature :)


--- Quote from: sfeinst on June 04, 2016, 09:52:11 pm ---Did you ever get a response (obviously not on this forum).

--- End quote ---
Martin Fr. mentioned in the Lazarus Mailing List what is required, though I didn't understand much of it. Nobody seems interested in implementing this in Lazarus though.   %)

--- Quote ---Also, does your fpGUI toolkit support it with the memo component?  I might switch to fpGUI just for that feature :)

--- End quote ---
Three weeks ago I actually posted some screenshots of my latest work on Elastic Tabstop support and fpGUI widgets. I've been working on adding support for the Memo and TextEdit widgets. The rendering to the Memo is perfect already, but because the Memo has no idea about TAB characters, the cursor movement is still incorrect. I'm working on solving that, then moving on to the TextEdit - which is the actual component I'm looking forward to using ET with.

Here are some screenshots with various ET parameters changed (sliders on the right). Each screenshot is annotated to explain what it is showing. An animated GIF would probably have been a much better visual example. All aligned code (in the middle or end of a line) is done simply by using one TAB character, ET does the rest.

And here is the last screenshot using a wacky proportional font - Comic Sans. Everything still indents and aligns perfectly.

I can't wait to start coding with much better looking proportional fonts.

Assuming I've understood correctly
I don't have time to do this  as you know - but maybe some sort of modified string grid used as an editor -
or spreadsheet setup with single character width columns or something.
Perhaps you could have multiple tab controls at various rows to control set depth blocks.
 (writing a spreadsheet from scratch isnt that
hard so you may not need to get bogged down with existing code if anyone wanted to try that.)

...just jamming a little on the idea.



[0] Message Index

[#] Next page

Go to full version