Noah Gary
Noah Gary

Reputation: 960

Restart SBT Shell in IntelliJ IDEA after SIGINT

I have a bad habit of pressing Ctrl+C when I want to copy an error from the SBT shell. This will kill the shell and I can't figure out how to restart it without exiting and reopening the project. Is there a way to do this? It's quite annoying.

EDIT:

Just to clarify for some of you answering: I am on linux. Running the 2020.1.1 release (Community Edition).

This is what my shell looks like after I kill it with Ctrl+c

enter image description here

There is no panel on the side with a Play/Stop/Etc button.

Upvotes: 4

Views: 1152

Answers (2)

Sangeeta
Sangeeta

Reputation: 491

I am using 2019.3 version of intellij idea currently. In this you have option :

View > Tool Window > Sbt Shell

and you will see the sbt shell. Also you can find it at the bottom where you can find other options like: Terminal and version control(if enabled)

In the prompt window you can see run button(green arrow something like : |> ) to get your shell started.

Upvotes: 1

Mario Galic
Mario Galic

Reputation: 48420

There should be Start sbt shell button on the left-hand side toolbar of sbt shell tool window as indicated by the arrow bellow

https://stackoverflow.com/questions/9488405/how-to-write-scala-matcher-for-class

After pressing it the shell should start and the button turns into Restart sbt shell

enter image description here

If the play button is not visible, then the side toolbar is likely hidden, so click on the three dots on the right of sbt shell and select Show Toolbar

enter image description here

Upvotes: 5

Related Questions