[TxMt] Run Command question

Ian White i.w.white at sheffield.ac.uk
Mon Dec 13 17:31:04 UTC 2004

Sorry, didn't realise the message was not in its own thread - started 
again here.

On 13 Dec 2004, at 17:24, David Wooten wrote:
> I'm trying to figure out a clever little trigger mechanism for Running 
> a Command sort of "invisibly". I'd like to assign a certain command to 
> the comma "," key, for example, and yet have the comma appear in the 
> current TM window, thus running the said command whenever I happen in 
> the natural course of events to type a comma ;). Now the closest I've 
> come is to "echo" the comma and send the results to the current 
> window, but of course this also gives me the output from the command 
> which I wish to be discarded.

I came across a similar problem when writing a php command completion 
tool (http://ian.ardes.com/phpcc).
The way I solved it was to write two separate commands, one outputting 
as a snippet, the other as a tooltip.
I then wrote a macro to run both of these commands, and bound this 
macro to the desired key.


More information about the textmate mailing list