[TxMt] delete a space: impossible
Allan Odgaard
throw-away-1 at macromates.com
Fri Feb 17 14:39:46 UTC 2006
On 17/2/2006, at 15:22, Alain Matthes wrote:
> [...] There are some latex widgets but the code goes in the
> clipboard and not in textmate . is it possible for a widget ?
It is, yes.
I haven't looked at these widgets, but presumably they use the
Widget.system() function to place the text on the clipboard.
One can insert text into TextMate by calling for example:
osascript -e 'tell app "TextMate" to insert "\\alpha"'
And from a widget, one can wrap that in Widget.system(…).
It is also possible to add “as snippet yes” to the line, so that the
text inserted is treated as a snippet.
A downside is that AppleScript/osascript is slow, so there will be a
delay from clicking the item in the palette, till the text is
inserted in TextMate.
More information about the textmate
mailing list