Re: [code] keybindings

From: Mitchell <m.att.foicica.com>
Date: Mon, 9 Jan 2017 08:52:30 -0500 (EST)

Hi Joseph,

On Sun, 8 Jan 2017, Joseph McDonald wrote:

>
> Hi,
>
> How to move current line/selection in curses textadept?
> manual shows "S-^Up" is that ctrl-shift-uparrow like GUI
> version? It doesn't do anything on curses. works fine in GUI.

Curses does not recognize that key binding. You'll have to define one of
your own.

> Is there a way to bring up a screen that shows all
> keybindings in current context
> and/or a way to show what is bound to
> a keystroke or keystroke sequence (like emacs describe-key)

No, this feature does not exist. You can use the Key Bindings reference[1]
in conjunction with your *~/.textadept/init.lua*'s key bindings.

> in GUI, Ctrl+/ is "toggle block comment"
> in curses it's M-/
> Is there a way to make it M-/ for gui as well?
> I tried:
> keys['m/'] = textadept.editing.block_comment
> but it doesn't work.

     keys['a/'] = textadept.editing.block_comment

The API documentation[2] lists platform modifiers. It may be in the manual
as well.

> I have
> -- for GUI ctrl-space
> keys['c '] = function() _G.buffer.selection_mode = 0 end
> -- for terminal this is ctrl-space:
> keys['c@'] = function() _G.buffer.selection_mode = 0 end
>
> to "set mark" like emacs and it works OK when using right/left arrow
> but when I use up/down arrows it undoes the selection. How
> to make it work with up/down arrows etc?

At first glance this appears to be a bug in Textadept's editing component
Scintilla[3]. I'll look into this further and perhaps file an upstream
bug.

Cheers,
Mitchell

[1]: http://foicica.com/textadept/api.html#textadept.keys.Key.Bindings
[2]: http://foicica.com/textadept/api.html#keys.Key.Sequences
[3]: http://scintilla.org

-- 
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 Mon 09 Jan 2017 - 08:52:30 EST

This archive was generated by hypermail 2.2.0 : Tue 10 Jan 2017 - 06:36:40 EST