Re: [code] [textadept] Interactive Lua mode?

From: Robert Gieseke <rob.g.att.web.de>
Date: Tue, 22 Oct 2013 22:02:50 +0200

Hi Dirk,

you can also reset Textadept's state with its `reset` function, so no
need to restart in most cases, I have bound this to a key, e.g.

keys['f9'] = function()
   io.save_file()
   reset()
end

This works if your code is somehow part of your `init.lua` or modules
loaded from it.

For throwaway code you could also assign Mitchell's suggestion to a
short cut. I'll use this -- I hadn't thought of this before and it is
obviously better than forcing it into a one-liner …

Robert

Am 10/22/13 9:48 PM, schrieb Dirk Günther:
> Hello,
>
> is there something like an interactive Lua mode? That is, I open a new
> window, key in a function such as
>
> function myfunc()
> do_something()
> end
>
> and I'd like to execute it within TA's context. This is to experiment with
> TA's API and such without restarting the editor all the times.
>
> I hope it's clear enough.
>
> Thanks
>
> Dirk
>

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 22 Oct 2013 - 16:02:50 EDT

This archive was generated by hypermail 2.2.0 : Wed 23 Oct 2013 - 06:45:22 EDT