Re: [Lazarus] Elastic Tabstop - what would the bounty be worth?
Isn't it already there? It seems like it replaced column selection (in terms of shortcuts). thanks, Dmitry On Tue, Jan 12, 2016 at 10:47 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > 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? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Elastic Tabstop - what would the bounty be worth?
Just a tech note. All that should be needed is one new unit, that replaces "SynEditTextTabExpander" (and then in SynEdit an option to use it (synedit.create does that)). Must be based on TSynEditStringsLinked like the existing. It has access to all lines, so it can calculate each tab. It also can (and has to) trigger line invalidation if tabs change. DoGetPhysicalCharWidths retunrs how many "cells" a tab/char occupies. For other chars is is - 1 (first byte of utf8 char) - 0 (2nd or later byte) - 2 (first byte of FULL WIDTH utf8 char (Chinese and some other)) there is a locking mechanism as well, so if a line is inserted (with text), it can skip notifications on the temp empty line. On 12/01/2016 15:47, Graeme Geldenhuys wrote: 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 - -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Elastic Tabstop - what would the bounty be worth?
On Tue, Jan 12, 2016 at 10:53 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > On 2016-01-12 15:51, Dmitry Boyarintsev wrote: > > Isn't it already there? > > It seems like it replaced column selection (in terms of shortcuts). > > > I'm afraid I don't know what you mean. > Ugh. sorry, nevermind. I was referring to multi-caret thanks, Dmitry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Elastic Tabstop - what would the bounty be worth?
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 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Elastic Tabstop - what would the bounty be worth?
On 2016-01-12 15:51, Dmitry Boyarintsev wrote: > Isn't it already there? > It seems like it replaced column selection (in terms of shortcuts). I'm afraid I don't know what you mean. Regards, - Graeme - -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus