4

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.

Noah Gary
  • 916
  • 12
  • 25
  • 1
    Which Intellij version/platform? For me linux/2019.3.1 there's a `Start sbt shell` play-button in the top left of the sbt shell tool window I can press to restart if I kill the shell. – CervEd May 02 '20 at 09:23
  • I'm on `linux/2020.1.1` and I don not have these buttons. That panel is completely missing. – Noah Gary May 05 '20 at 14:59

2 Answers2

5

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

Mario Galic
  • 47,285
  • 6
  • 56
  • 98
1

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.

Sangeeta
  • 491
  • 5
  • 22