Re: [textadept] Interactive Lua Prompt

From: Robert <ro....at.web.de>
Date: Mon, 28 Mar 2011 10:08:02 +0200

On Mon, Mar 28, 2011 at 9:22 AM, SteveD <steve.j.dono....at.gmail.com> wrote:
> Hi all,
>
> First post, and as usual, coming in with all feet kicking.
>
> lua_prompt.lua: https://gist.github.com/890099
>
> This is a cool way to explore Textadept using interactive Lua, unlike
> single-shot F2 commands.
>

Cool, indeed...

[...]
> Although generally I like auto-pair completion, it does mess a bit
> with the interactive prompt - would be useful if this feature could be
> disabled selectively for message buffers. (Comment out this line if
> you want to see the issue)
>
Or put it with "true" in your interactive prompt :-)
You could have an buffer_after_switch event check for the buffer.title
and switch
auto-pairing on and off.
Another idea: you could change the buffer name to "Lua buffer" or something.
Toggling the lexer to lua works as well and gives you auto-completion.

> Interesting behaviour: if Textadept has initially just an Untitled
> buffer, then any gui.print() will bring up a message view and split -
> but in this case both views will point to the new message buffer.
> Easy to reproduce, just an empty session and F2 print 'hello'.   Not
> sure if it's a big issue, but it is odd.
>
> steve d.
>

A view is just a view on all available buffers, so this is probably
expected behaviour, but you
could add
if #_BUFFERS == 1 then view:unsplit() end
in lua() as a workaround.

Robert
Received on Mon 28 Mar 2011 - 04:08:02 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:03:41 EST