robhitt
robhitt

Reputation: 91

VS Code - How to have Terminal pane open by default?

In Visual Studio Code when I open the application I have to re-open the integrated terminal window every time.

Do you know the steps to have the CLI pane open as soon as the application loads by default without manually doing ctrl-backtick every time?

Upvotes: 6

Views: 4529

Answers (4)

Hallel
Hallel

Reputation: 379

VS Code refers to the section of the window the terminal is in as the "panel". There is a similar question here on Stack Overflow that uses the term "panel" and has a helpful answer.

To quote the answer here for convenience:

"Vscode should remember whether the panel is open or not each time you close the window. But if it doesn't or you typically have it closed when you exit that vscode window and you have to Ctrl+J each time you open vscode try putting this task into your tasks.json:

{
  "label": "open Panel",
  "command": "${command:workbench.action.togglePanel}",
  "type": "shell",
  "problemMatcher": [],
  "runOptions": {"runOn": "folderOpen"}
},

"Now whenever the workspace opens, the togglePanel command will run automatically."

Thanks to Mark for providing this answer and the code example.

Upvotes: 0

falynx
falynx

Reputation: 21

I'm new, so I can't post comments yet. But I think an improvement to the solution offered by @victor-s is to use workbench.action.terminal.toggleTerminal, since that won't create a new terminal if one is already open.

Upvotes: 1

Victor S.
Victor S.

Reputation: 2767

You can try the following:

  1. Install an extension: Auto Run Command.
  2. Reload Visual Studio Code after installation.
  3. In settings ctrl+, add following:
"auto-run-command.rules": [
    {
        "command": "workbench.action.terminal.new",
    },
],

Upvotes: 3

igorc
igorc

Reputation: 2034

No built in way to do this , however you can submit a feature request here.
Or wait for this extension to mature.

Upvotes: 0

Related Questions