Re: [code] Defining jk key chain outside of command_mode (insert mode, if there's one) disables actual j character

From: Chris Emerson <c-ta.att.mail.nosreme.org>
Date: Sun, 21 Aug 2016 23:00:07 +0100

Hi,

On Sun, Aug 21, 2016 at 08:42:31PM +0430, Alireza Bashiri wrote:
> Thanks, but it doesn't contain what I want. how to create an isolated mode
> just like command_mode to prevent keys outside of the mode to be
> overmapped.

You can set keys.MODE to a string , say "my_mode", then Textadept will look
up key bindings in keys.my_mode[keyname] instead of keys[keyname].

I'm the textadept-vi guy, and use that for command/insert/visual modes. With
a bit of Lua metatable magic you an also make your submode fall back to the
default (or other) mode for any bindings not present.

Regards,

Chris

> On Sun, Aug 21, 2016 at 8:17 PM, Robert Gieseke <rob.g.att.web.de> wrote:
>
> > Hi Alireza,
> >
> > have you seen
> >
> > https://github.com/jugglerchris/textadept-vi
> >
> > If you're trying to emulate Vim behaviour it might already do what you
> > want or give you hints on how to achieve what you want ...
> >
> > Here is another one:
> >
> > https://github.com/pauldub/textadept-vim/blob/master/src/vim.lua
> >
> > No updates in a while but it might be useful to look at on how to
> > implement Vi emulation.
> >
> > Cheers,
> > Robert
> >
> > Am 21/08/16 um 15:36 schrieb Alireza Bashiri:
> > > is there something like command_mode, insert_mode to define jk key chain
> > > to prevent from affecting actual j character?
> >
> > --
> > 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 Sun 21 Aug 2016 - 18:00:07 EDT

This archive was generated by hypermail 2.2.0 : Mon 22 Aug 2016 - 06:49:21 EDT