Re: [code] help needed with textadept-ncurses

From: Simon <>
Date: Thu, 16 May 2013 22:16:14 -0700

On Thu, May 16, 2013 at 9:29 PM, Mitchell <> wrote:
> Hi Simon,
> On Thu, 16 May 2013, Simon wrote:
>> I've just been trying it out and have some questions:
>> 1. The home & end keys worked perfectly in one terminal but in a
>> terminal then every time I pressed home or end then the text 'NUL' would
>> get inserted at the position of the cursor. The same terminals work
>> perfectly with the home and end keys in e.g. vim. How can I fix this
>> in TAN?
> Which terminal is it? Vim uses termcap while Textadept uses an
implementation of curses like ncurses.

It's SecureCRT doing xterm:

It works fine with other software that runs in the terminal e.g. vim.

>> 2. Is there a search option to list all the occurrences? I'm guessing
>> 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

I'm tempted to give it a try :-)

>> 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.:

...and it'll give me the options foo or foobar to choose from. How to get
this to work in TAN?

>> 4. How to get a flashing cursor in TAN?
> This should be supported by your terminal. Textadept is not responsible
for such things.

So here's what happens: I can start a gnome terminal or SecureCRT terminal
and the cursor is flashing. I can edit a file using vim using either
terminal and the cursor flashes. But if I edit a file using either terminal
and TAN then the cursor stops flashing while TAN is running. As soon as I
exit to the terminal then the cursor starts flashing again. Are you sure
TAN has nothing to do with the flashing?

>> 5. How to get shift-home and shift-end to work in TAN?
> This is terminal-specific. My LXTerminal supports most Shift+key
combinations and I know xterm does too.

I'll take a look.

>> 6. Will it ever be possible to search by regular expression?
> There is a hack to do this:
> I don't know if it will ever be supported natively though. Regex
libraries are quite big.

Have you had a look at this?

>> 7. How is it possible to map ctrl-c and ctrl-v to shift-insert and
>> ctrl-insert?
> Textadept cannot read and write to the X selection.

And if I just want shift-insert to do the same as ctrl-v?

>> 8. Is there an equivalent of ctrl-tab for TAN?
>> 9. How to get help inside TAN when you forget keys? For example, I
>> accidently hit ctrl-r and then I couldn't figure out how to navigate back
>> to the file that I was editing; ctrl-tab and ctrl-b didn't work :-(
> Key binding reference is here:
> The manual also states that M-S-C shows a list of commands and their key
>> 10. If I modify a buffer, hit ctrl-q, then the are-you-sure dialog pops
>> 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?

>> 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?

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?


> 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 - 01:16:14 EDT

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