[TxMt] Re: UI blocked while running command with “Output: Discard”
doob at me.com
Sun Aug 7 08:15:40 UTC 2016
> On 06 Aug 2016, at 23:21, Stefan Daschek <stefan at daschek.net> wrote:
> I’m working on a new RuboCop bundle. I want the linting to take place everytime a Ruby document is saved, with warnings then displayed in the gutter.
> So I implemented a very simple command using `callback.document.did-save` and `TextMate::Executor.run`, and it works great so far. However, if I set the command to “Output: Discard”, TextMate’s UI seems to be blocked (no cursor movement or other editing possible) while the command is running.
> Interestingly this does not happen with “Output: New Window”: In this case I can continue editing the document even while the command is still running.
> Is this a bug? Or is there are workaround?
It’s intended behavior. The reason is that the command should not be able to run and possibly edit the document simultaneously while the user is editing the document.
The solution is to run the command in the background/daemonized. See this post for an example .
My I ask why you’re creating a new RuboCop bundle when this one  exists?
You might also want to take a look at this pull request that adds a RuboCop formatter command to the Ruby bundle .
More information about the textmate