Recent

Author Topic: Elastic Tabstops - what would the bounty be worth?  (Read 21300 times)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Elastic Tabstops - what would the bounty be worth?
« Reply #15 on: June 15, 2016, 06:01:46 pm »
...
I'm fine with ET and other people using tabs, I'm just disappointed that "block-selection" got (is) broken in IDE.

I always treat a source code as 2d array of characters, that prevents me from using tabs ( that bring "holes" in this matrix) 

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Elastic Tabstops - what would the bounty be worth?
« Reply #16 on: June 15, 2016, 06:07:22 pm »
It doesn't affect indentation. It only affects alignment. And the reason why Tabs get such a bad rap, is because of the idiotic way all [or most] editors implement (visualise) Tabs.... where a Tab character is equals to x amount of spaces.

You don't need any "tab" concept for that, elastic or otherwise. Input is space aligned, output is space aligned, and the only difference is the algo inbetween.
 
Quote
But spaces limit how I would like to see source code. eg: You might prefer 2 space indentation, Martin (from MSEide+MSEgui) prefers 1 space indentation, I prefer 4 or 6 space indentation (depending on how complex the code and how deep the nesting levels are). With spaced we can't display the same file in our preferred layout, but with Tabs (especially when ET is available too) you can - and all importantly, it doesn't require modifying the underlying text file.

IMHO if you really feel that way and consider variable hardtabs a possibility and sacrifice multi-editor general textformat principles, you might as well go the whole Oberon way and store the source as token streams or trees and forget about textual format.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Elastic Tabstops - what would the bounty be worth?
« Reply #17 on: June 15, 2016, 06:36:56 pm »
It's a nice demo. For small texts only. When using a larger text it becomes slooooow.
Correct, and the author explicitly mentions that fact. The Java Demo was originally a Java Applet, with the sole intent to simply show the concept of Elastic Tabstops. It was never meant as a reference implementation. Different editors implement ET in different ways. jEdit for example supports ET, and it is fast even on very large text files.

As for ET configuration, again the Java demo was meant to show the concept only. My own fpGUI implementation and test application of ET makes it very easy to configure the default indentation size and padding size - as my earlier screenshots showed (trackbars on the right).

Quote
B.T.W. TSynEdit doesn't support proportional text (yet), does it? I can select a proportional font but that just looks ugly.
I would guess not. Simply getting ET support with a mono spaced font would at least be a good starting point.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Elastic Tabstops - what would the bounty be worth?
« Reply #18 on: June 15, 2016, 06:41:00 pm »
I'm just disappointed that "block-selection" got (is) broken in IDE.
I'm not surprised. Tab support in Lazarus IDE was broken for years before I started raising some Mantis reports. In fact, Tab support in Lazarus is still pretty broken. Maybe some blame should go to CodeTools (whichever one does code completion).
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

jack616

  • Sr. Member
  • ****
  • Posts: 268
Re: Elastic Tabstops - what would the bounty be worth?
« Reply #19 on: June 17, 2016, 01:36:01 pm »
Quote
I'm afraid you totally misunderstood the workings of Elastic Tabstops. All you need to implement ET is a text control that allows setting tab widths in pixels

Ahh .. I see.

You mean postscript.
Sadly the world has been crippled with microsoft rubbish for 30 years making a decent interface
almost impossible.

Perhaps super sized kerning on variable width fonts...
Hmm... how about a font with multiple pixel widths for whitespace characters and everything else
the same... again it would need work but maybe it could come close and wouldn't need to have
compatibility issues. Different blocks of text could use different combinations of character widths.
I'm still unclear why limited pixel spacing in a microsoft world  is needed though but I guess
others have seen the benefit.






Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Elastic Tabstops - what would the bounty be worth?
« Reply #20 on: June 17, 2016, 01:46:19 pm »
You mean postscript.
...snip...
Perhaps super sized kerning on variable width fonts...
Huh? Sorry I completely lost you there. ET doesn't require any special fonts or rendering API's. It also doesn't need tab stops defined in pixel widths, though it is hugely beneficial. eg: jEdit doesn't use pixels to define tab widths, it uses spaces (like most editors). Yet they made it work for ET. The down side - you are limited to mono-spaced fonts only. When tab stops are defined in pixels, you get the full benefit of ET - more accurate indentation, more accurate alignment and the use of proportional (variable width) fonts.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: Elastic Tabstops - what would the bounty be worth?
« Reply #21 on: April 24, 2018, 01:32:53 pm »
Seems Graeme dont need ET for ATSynEdit component? I could help here.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Elastic Tabstops - what would the bounty be worth?
« Reply #22 on: April 27, 2018, 04:53:42 pm »
A partial working solution is on mantis

https://bugs.freepascal.org/view.php?id=9650
« Last Edit: April 27, 2018, 05:05:29 pm by Martin_fr »

 

TinyPortal © 2005-2018