[TxMt] Re: TMTOOLS plug-in 0.9 release (for testing!)
Hans-Joerg Bibiko
bibiko at eva.mpg.de
Wed Oct 10 13:36:16 UTC 2007
On 10 Oct 2007, at 13:45, Piero D'Ancona wrote:
> Concerning onKeyDownAfterDelay: how difficult would it
> be to add a command which intercepts KeyDown and
> also understands what key has been pressed? i.e.
> returns the key pressed, or performs an action only
> if the key belongs to a certain list
In principal is this possible.
Maybe à la
"$TMTOOLS" do onKeyDownAfterDelay '{
keylist={
a=A_SHELLCOMMAND;
b=AN_OTHER_SHELLCOMMAND;
};
passEvent=yes;}'
One question would be: Why only on a single keyDown event? What do
you want to do?
The only thing I have in my mind is a kind of input method editor to
simplify the typing of accented characters for instance.
I write 'fac' ; I wait a bit and than I see a list of all 'c' with
diacritics: çćĉċčƈɕḉ⒞ⓒc̷
On the other hand I could image that it would be useful to look for
the current word and depending on it to do something.
Example: the do onKeyDownAfterDelay command checks TM_CURRENT_WORD;
if TM_CURRENT_WORD is 'btw' it will fire a shell script which
replaces 'btw' by 'by the way' automatically. -> if I type fluently
'btw I want ...' -> nothing happens, but if I type 'btw' and waits
for the given time it replaces 'btw' with 'by the way'.
Hans
More information about the textmate
mailing list