so Textmate has this great feature of auto-closing ( { [ " ' signs and putting the caret between them,
e.g. type [ --> get []
and also on selected text, if you press any of these keys, it will wrap the text in a pair of them. e.g.
*some selected text* , hit ( --> (*some selected text*)
how would i go about writing a script (Applescript?) which replicates this feature, so that it is usable system-wide?
see also here: http://stackoverflow.com/questions/72732/how-do-i-get-textmate-style-quotes-in-emacs