Re: [code] Some advice on textadept programming

From: Robert Gieseke <>
Date: Tue, 03 Feb 2015 19:12:11 +0100

Hi Carlos,

Am 03/02/15 um 18:53 schrieb Carlos Pita:
> say I could babble some lua and I wanted to code a new ta module or
> some advanced configuration. In that case I would need some advice
> from the savvy:
> 1) How do you reload and inspect your changes? [1] I know that C-e
> opens the command entry, but I'm looking for concrete advice: do you
> run something like "reset(); my_function()" or what?

This should work. You could also assign these to a short cut key.

> 2) How do you debug or trace your changes? Do you just io.print?

Just `print` should output to the console, on OS X you could look at
Console.log app output or start Textadept from within the App directory,
on Linux it should just print to the Terminal.

Another way is using `ui.statusbar_text`:
ui.statusbar_text = 'your debug message '..tostring(idx)

> 3) In general: do you have any useful patterns or techniques to share?

Depending on what you do it might be helpful to have another instance of
Textadept or another editor open, in case you break the startup process.

You've probably already seen this, but if not, Lua in just "y" minutes:

With Scintillua and lexer development it might also be an option to use
it as an independent library for developing and testing your lexer, at
least for temporary debugging[1].



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 03 Feb 2015 - 13:12:11 EST

This archive was generated by hypermail 2.2.0 : Wed 04 Feb 2015 - 06:44:36 EST