Re: [code] [textadept] Entering special characters

From: Mitchell <m.att.foicica.com>
Date: Fri, 17 May 2013 00:17:21 -0400 (EDT)

Chris,

On Tue, 14 May 2013, Chris Emerson wrote:

> Hi Robert,
>
> On Sun, May 12, 2013 at 08:26:41AM +0200, Robert wrote:
>> Hi Chris,
>>
>> On Sun, May 12, 2013 at 1:24 AM, Chris Emerson <c-ta.att.mail.nosreme.org> wrote:
>>> One useful feature in vim is being able to enter any character literally by
>>> prefixing it with Ctrl-V.
>>
>> Not sure if this is what you mean, but maybe something like this:
>> keys['cv'] = {
>> ['\n'] = function() buffer.add_text('\\n') end,
>> ['\t'] = function() buffer.add_text('\\t') end
>> }
>
> Ah, thanks - that seems to be a good solution for insert mode. With a
> metatable that avoids too much repetition too (though I had to add a dummy
> entry to the main table for it to be recognised).

This is fixed -- you don't need the dummy entry anymore. I added a check
that recognizes a table as part of a keychain if it has a metatable.

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.
Received on Fri 17 May 2013 - 00:17:21 EDT

This archive was generated by hypermail 2.2.0 : Fri 17 May 2013 - 06:52:59 EDT