Re: interested in scite emulation

From: Scott Weisman <sweis....at.gmail.com>
Date: Tue, 7 Dec 2010 02:05:38 -0800 (PST)

This is PERFECT! Esc is just fine to get out of it. Thanks.

> You could try putting this in your init.lua (keys.aa if you're on a Mac):
>
> keys.ca = { function()
>   local buffer = buffer
>   local KEYSYMS = _m.textadept.keys.KEYSYMS
>   local pos = buffer.current_pos
>   buffer:select_all()
>   local esc = events.connect('keypress', function(code)
>     if KEYSYMS[code] == 'esc' then
>       buffer:goto_pos(pos)
>       events.disconnect('keypress', esc)
>     end
>   end )
> end
>
> }
>
> Pressing Esc should return you to your position. Really helpful - I
> often press ctrl-a when I meant to hit ctrl-s...
Received on Tue 07 Dec 2010 - 05:05:38 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:55:26 EST