Reputation: 1
I installed the REPL package on Sublime Text 3 and when I run the script a new window opens and shows the results but I can't stop the execution (e.g. an infinite loop). The 'Cancel Build' command seems to be not active (grey), as shown in the image below:
This is what I have in the default key map:
{ "keys": ["ctrl+break"], "command": "cancel_build" }
.
As you can see from the image, it lets me modify the key (currently Ctrl+Alt+C) but it's still not working (typed { "keys": ["ctrl+alt+c"], "command": "cancel_build" }
).
What should I do? Thanks in advance
Upvotes: 0
Views: 834
Reputation: 11
In Sublime Text (4126), I use ctrl+B
to interrupt an ongoing build while building with Latextools giving a message:
build failed.
crtl+alt+c
, crtl+c
, and crtl+break
(which is greyed out) do not work for me.
Upvotes: 0
Reputation: 22821
In order to be able to cancel a build, the sublime-build
file that's used to control the build needs to do one of two things:
Include a target
key to specify what plugin command to invoke to execute the build and a cancel
key to specify what plugin command to invoke to cancel the build.
Not include a target
key, which makes the build execute using a built in default command that inherently knows how to cancel the build.
SublimeREPL uses a custom command to trigger the REPL to display, and that is either not in a sublime-build
file (like when you pick the command from the REPL menu itself) or is a sublime-build
file that doesn't include a cancel
key and thus can't be cancelled.
To cancel a program in process in SublimeREPL, the best bet is probably to close the tab that it's running in, which should stop the process from running.
Alternately, you may want to investigate Terminus as a replacement, which is a more actively developed package that makes it possible to have a build wherein the cancel key does indeed work if you'd like that workflow.
Unlike SublimeREPL which comes mostly configured out of the box and should Just Work (presuming you have the appropriate tools already installed), Terminus requires you to set up your tools manually, which may be a stumbling block. The Terminus README includes links to some YouTube videos (disclosure: I'm the author of the videos) that shows how to use it for interactive builds.
Upvotes: 1