Re: [Ext] [code] Moving around and selecting text with arrow and modifier keys

From: James Reynolds <reynolds.att.biology.utah.edu>
Date: Thu, 25 Jun 2020 18:44:27 +0000

I tried this and it doesn't work. Am I doing something wrong?

keys['csleft'] = buffer.char_left_rect_extend
keys['csright'] = buffer.char_right_rect_extend
keys['csup'] = buffer.char_up_rect_extend
keys['csdown'] = buffer.char_down_rect_extend

James Reynolds
Sr Systems Administrator
School of Biological Sciences
The University of Utah
801-585-3086

> On Jun 25, 2020, at 11:37 AM, Mitchell <m.att.foicica.com> wrote:
>
> Hi James,
>
> On Thu, 25 Jun 2020, James Reynolds wrote:
>
>>>> I can't see the alt-shift-arrow keybinding in the keys.lua file. I tried to manually set it with the following but it didn't work.
>>>>
>>>> keys['asleft'] = buffer.word_left_extend
>>>> keys['asright'] = buffer.word_right_extend
>>>
>>> This works for me when I put it in my *~/.textadept/init.lua* in Mac. I had to reset or restart Textadept to see the changes.
>>
>> Ugh, it works for me now too. I must've done something wrong yesterday.
>>
>>> Alt+Shift+Arrow is for rectangular selection, which for single lines looks like single-character selection. When you start using the Up and Down keys, it becomes clear what the intent is.
>>
>>
>> Oh yeah...
>>
>> I tried to swap the cntl-shift-arrow and alt-shift-arrow keys and it doesn't work. I debugged it and the following prints out "nil nil nil nil". I'm guessing the alt-shift-arrow keys are defined in C and not in keys.lua, is that right?
>
> Yes, that's right. You'll have to manually map the keys to the buffer functions.
>
> Cheers,
> Mitchell
> --
> 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.
>

-- 
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 Thu 25 Jun 2020 - 14:44:27 EDT

This archive was generated by hypermail 2.2.0 : Fri 26 Jun 2020 - 06:35:49 EDT