[TxMt] Re: Inserting text into a background document

Allan Odgaard mailinglist at textmate.org
Tue Sep 27 05:48:13 UTC 2016

On 27 Sep 2016, at 7:35, David Green wrote:

> I run a lot of commands from TextMate, and sometimes they can take a 
> long time to finish. The usual “execute line” command doesn’t 
> return until the execution is complete, so the document (and TM as a 
> whole) is unresponsive while waiting. I can run them in the 
> background, but then I need a way to insert the output into the 
> original document. My current workaround is to bring the document 
> forward using 'mate', but that means whenever output is ready, the doc 
> jumps into the foreground, interrupting anything else I may have been 
> doing.

Is the issue that it locks the entire application? E.g. if running a 
(slow) command only blocked the document for which we are waiting for 
results, would that solve the problem?

> I don’t know of a way to do this, but it would be great if I could 
> send text to a document without giving it focus… e.g. something 
> like:
>     echo "some output" | mate --no-focus --uuid $DOC

I assume you need this to also work for untitled documents, otherwise 
simply updating the file on disk should work.

More information about the textmate mailing list