Re: [code] help needed with textadept-ncurses

From: Robert <>
Date: Fri, 17 May 2013 08:36:12 +0200

Hi Simon,

possible answers for some of your questions.

On Fri, May 17, 2013 at 7:16 AM, Simon <> wrote:

>>> 2. Is there a search option to list all the occurrences? I'm guessing
>>> this
>>> will *never* happen in TAN since split editing will also *never* happen,
>>> right?
>> Not currently, but you could write such a feature. You don't need split
>> views for it unless you wanted to see the list and the buffer at the same
>> time.
> I'm tempted to give it a try :-)

I am not sure what exactly you want to see (list of all search
results?), but you could have a look at Textredux
( which implements text-based
lists (e.g. for buffers) and can be used for any kind of list you

>>> 3. How to get command completion working in TAN?
>> What kind? Lua completion in the command entry works.
> In TA then I can just type in e.g.:
> foo
> bar
> foobar
> fo<ctrl-enter>
In the Curses version this is Meta-Enter by default. (So most likely
Alt-Enter.) If this doesn't work you can try redefining it, in the
command entry (Meta-c in Curses -- or for permanence add it in your
init.lua) you can redefine it:
keys['c '] = _M.textadept.editing.autocomplete_word
would assign this to Ctrl-Space.

>>> 8. Is there an equivalent of ctrl-tab for TAN?

What do you mean? Switching to the next open buffer ist Meta-n in Curses.

>>> 10. If I modify a buffer, hit ctrl-q, then the are-you-sure dialog pops
>>> up
>>> instantly, but if I press esc then it takes at least a second to
>>> disappear... why the delay?
>> If you are still experiencing this in 6.6 beta, then your ncurses is
>> probably to blame. It may not support the ESCDELAY setting.
> How can I determine the version of TAN installed? And how can I determine if
> ncurses is to blame (I'm running Ubuntu 12.10 BTW)? And if ncurses is to
> blame then is there an alternative to ncurses?

In the command entry (Meta-c in curses) type
In the GUI version you can also look at the About dialog.

>>> 11. What does the curses M-M key combination mean? How to press the first
>>> 'M'? It must be in the docs somewhere but I can't find it!
>> M-M is Meta-M (Meta is generally the Alt key).
>> This may be of some help:
> Thanks. I did look long and hard at that page before writing 11 :-) The
> sequence M-M uses the Meta-M but the table at the link doesn't mention
> 'meta' anything, only 'alt'. Are they the same? Also the table at the link
> shows a lower case 'm' next to 'alt' for terminal. Is M-M then same as m-M?
> Also both gnome terminal and SecureCRT don't send alt-M to the terminal
> application which makes me wonder if alt-m is the Meta-M because surely it
> would be a default key combination that works in most terminals including a
> wide-spread terminal such as gnome terminal. So I still don't understand how
> to press M-M. Are you suggesting that I fiddle with gnome terminal or
> SecureCRT to get them to send alt-m to the application running in the
> terminal? How can I determine definitively what the meta key is?

If e.g. 'alt-c' opens the command entry then the 'meta' key for your
terminal is 'Alt'.
'm' and 'M' and the first position of an entry in the `keys` should be
the same thing.
I think in the documentation 'M' or 'Meta' is uppercased, and in the
actual definitions (like in the table which explains how keys map to
strings for the definitions) it is lower case.

> New question :-)
> 12. Although TAN doesn't have a split screen itself, would it be possible to
> somehow get it to play nicely with e.g. tmux so that e.g. 10 files open
> would be 10 different instances of TAN in 10 different tmux windows? How to
> get TAN's open command to create a new tmux window with a new instance of
> TAN automatically, and get the name of the window to be the name of the file
> edited? I guess TAN's own copy and paste will not work between the different
> TAN instances, or? How to get around this? Would it be easier to make
> separate TAN processes do IPC rather than implement window splitting in TAN?

Mitchell considered implementing split views in the curses version if
I remember correctly but it turned out to be too complex I think.
As for using tmux, just give it a try :-) I don't think anyone has
tried it so far. Maybe you could use a temp file as the clipboard
between the instances?

Hope this helps,

> Thanks,
> Simon
>> Cheers,
>> Mitchell
>> --
>> You are subscribed to
>> To change subscription settings, send an e-mail to
>> To unsubscribe, send an e-mail to

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Fri 17 May 2013 - 02:36:12 EDT

This archive was generated by hypermail 2.2.0 : Fri 17 May 2013 - 06:53:02 EDT