How to add multiple terminals in VS Code?

前端 未结 11 2468
轻奢々
轻奢々 2020-11-30 17:15

Can we add multiple different terminals in the VS Code? I am planning to add following three terminal and work with all of those :

  1. Windows Com
相关标签:
11条回答
  • 2020-11-30 18:03

    In the terminal tab, there's a Split Terminal button. Works like a charm

    0 讨论(0)
  • 2020-11-30 18:08

    Even the question is asked last year and the answer is accepted but still I feel to answer this question as I didn't found any simple, suitable and complete answer while as a development I need multiple terminal handy in a click like below:-

    and I don't bother about their path, add another extension for what the VS Code is already capable of or reload VS Shell etc and go to insert and setup the settings files manually.

    I found this question is asked many times and almost all landed up manually setup of write some settings etc. or sometimes only opted to get a single type of terminal. The answer of @Pawan is somewhat near but again that solution finally land up to a single terminal, going to command setup for switch terminal and this one will work for git or any other terminal.

    If you have tools installed which worked on command line like power-shell and git along with default cmd prompt in windows then the follow the quick three steps to get all terminals at once and switch to anyone with a click.

    1. Open terminal, it should be visible (use ctrl+` or from menu View-> Integrated Terminal )

    2. Open commands search (use Ctrl+Shift+P or from menu View->Command Palette...)

    3. In command box Type "Terminal: Select Default Shell" to select this option from drop down.
    4. As you select this option, then all the available commands which are in path will be listed below like below

    5. Just click any one which you like to add for quick access from command list.

    6. Finally, in the terminal window, just click on + sign next to terminal list as shown below:-

    The terminal selected in step 5 will now added after performing step6 to the list without removal of earlier terminal.

    1. Repeat step 3-6 for adding any other terminal to command list.

    To work with particular terminal just select the required one in the terminal list of the terminal window.

    0 讨论(0)
  • 2020-11-30 18:09

    No. Perhaps in the future. See https://github.com/Microsoft/vscode/issues/7504

    If you use bash, you can use tmux to achieve something similar, as discussed in the issue linked above.

    0 讨论(0)
  • 2020-11-30 18:10

    press ctrl + shift + ` shortcut, or press a cross sign to run new terminal, then type bash if your default mode is powershell or powershell if your default mode is bash. And here you are, your terminal is switched.

    0 讨论(0)
  • 2020-11-30 18:10

    For WSL Ubuntu on Windows terminal:

    File -> preferences -> settings -> click code icon in top right

    Enter the following:

    {
        "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe",
        "git.enableSmartCommit": true
    }
    
    0 讨论(0)
提交回复
热议问题