Re: [code] [code}[textadept] elastic tabstops 'unleashed' version release

From: Peter Rolf <>
Date: Tue, 28 Nov 2017 14:51:48 +0100

Hi Pedro,

thanks for your interest. There is no need for a compilation (it's lua
code only). Just copy the complete content (files and directory) of the
7zip archive to your '.textadept/modules' folder and add

        ets = require("elastic_tabstops").enable()

to your 'init.lua' file.

You may want to add something like this

        -- toggle Elastic Tabstops
        keys["cf12"] = ets.toggle_status

..., so you can enable|disable the module at any time. There's also no
need to worry about unwanted changes in your texts. 'Elastic tabstops'
doesn't change a single bit in your texts, it just arranges them

Optional changes:

'set_standards()' changes the width of the indentation (minimum and
padding value). Read the upper part of the modules 'init.lua' file for
more details.

        ets.set_standards("nn", "nn", 32, 32) -- default values
        ets.set_standards("A", "H") -- my settings

You can also set the indentation to a specific amount. Let's say you
want to indent exactly the amount of the bold keyword 'end'.

ets.set_standards("en", "d", 5, 5) -- 5 = keyword style

And done. Works for proportional fonts and with any style.

Just try the module and report back if you like (personal mail [@]
prefered to avoid unnecessary 'spam' on the list).
The module should work reliable now and has no noticable impact on the
editors speed. The lastest version (27.11.2017) can be found here [*].


[@] indiego at gmx dot net

Am 28.11.2017 um 12:09 schrieb Pedro Andres Aranda Gutierrez:
> Hi Peter,
> Do you have any instructions to compile the shared library. I'm on *IX
> systems (*BSD, Linux, Mac).
> I'd like to test the concept :-)
> /PA
> On 21 November 2017 at 15:15, Peter Rolf <
> <>> wrote:
> Hi,
> I just finished my code cleanup on the original "Elastic Tabstops"
> module by Joshua Krämer (thanks!). This version is about 2-561 bazillion
> times faster than the reference code (of course this is just a rough
> approximation). If you know how to profile this module, let me know. The
> best I could find was "pepperfish" for Lua 5.1 (profiling doesn't seem
> popular in Lua).
> Aside from the speed improvements, I added support for multi style text
> elements and the level of indentation is modifiable now. There is also
> an single gif which shows part of my 'init.lua'. Be sure to use a
> 'correct' scaling value (best at 100%, 200%, 400%...), otherwise it will
> mess up the picture.
> The module is not tested much (only with a hand full of texts I use) and
> I also haven't read the Scintilla related part (so my understanding of
> the algorithm is still limited). Let me know if you find a bug or have
> suggestions for improvement.
> <>
> Best wishes,  Peter
> --
> You are subscribed to <>.
> To change subscription settings, send an e-mail to
> <>.
> To unsubscribe, send an e-mail to
> <>.
> --
> Fragen sind nicht da um beantwortet zu werden,
> Fragen sind da um gestellet zu werden
> Georg Kreisler

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 28 Nov 2017 - 08:51:48 EST

This archive was generated by hypermail 2.2.0 : Wed 29 Nov 2017 - 06:36:31 EST