Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch task directly into split terminal #47265

Open
TwitchBronBron opened this issue Apr 5, 2018 · 5 comments
Open

Launch task directly into split terminal #47265

TwitchBronBron opened this issue Apr 5, 2018 · 5 comments
Assignees
Labels
api api-finalization feature-request Request for new features or functionality tasks Task system issues
Milestone

Comments

@TwitchBronBron
Copy link
Contributor

TwitchBronBron commented Apr 5, 2018

Issue Type: Feature Request

The integrated terminal split panes should support launching a task from the command palette into a split terminal panel.

Here is the current workflow

  1. Launch a long-running task from command palette by typing ctrl+p -> task first-watcher-task -> enter. (A new terminal window appears, running the task).
  2. Click the split terminal button to create a split terminal.
  3. In the split terminal, type the arguments for the second task and run it by pressing the enter key in the terminal. Can't run ctrl+p -> task second-watcher-task -> enter because that would open a whole new terminal section of its own.

Here is the desired workflow

  1. Launch a long-running task from command palette by typing ctrl+p -> task some-watcher-task -> enter. (A new terminal window appears, running the task).
  2. Launch the second long-running task from comand palette by typing ctrl+p -> task second-watcher-task -> enter. Somehow, this task runs in a second panel of the split terminal, based on some extra command, a task configuration setting, or perhaps by having focus in an already opened split terminal.

VS Code version: Code - Insiders 1.22.0-insider (8133505, 2018-04-03T01:09:54.914Z)
OS version: Windows_NT x64 6.1.7601

@vscodebot
Copy link

vscodebot bot commented Apr 5, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the insiders label Apr 5, 2018
@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Apr 6, 2018
@dbaeumer dbaeumer added this to the On Deck milestone Apr 6, 2018
@vscodebot vscodebot bot removed the insiders label Apr 10, 2018
@dbaeumer dbaeumer added the tasks Task system issues label Sep 10, 2018
@fleps
Copy link

fleps commented Dec 11, 2018

This would be awesome!

@TwitchBronBron
Copy link
Contributor Author

One idea is to create a new terminalGroup field.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "ionic-serve",
            "type": "shell",
            "command": "ionic serve",
            "isBackground": true,
            "terminalGroup": "watchers"
        },
       {
            "label": "dotnet-serve",
            "type": "shell",
            "command": "dotnet watch",
            "isBackground": true,
            "terminalGroup": "watchers"
        }
    ]
}

Here's how it would flow:

  1. Launch task ionic-serve. No consoles are open, so it creates a new console for the task and gives it the name 'watchers'.
  2. Launch task dotnet-serve. There's already a terminalGroup with the name watchers, so that terminal is split, and the new dotnet-serve task is run in the right part of the split terminal.

@markm77
Copy link

markm77 commented Dec 26, 2018

I support this proposal for tasks (particularly "terminalGroup" idea suggested above) but think this feature should be supported for launch configs too.

I use integrated terminals and a compound launch configuration for debugging multiple Node processes with Nodemon. It would be great to have "terminalGroup" option when "integratedTerminal" specified in launch config to support split terminals when debugging. This would stop me forever cycling between terminals when debugging. It would also enable me to have one terminal with multi-splits for tasks, another with multi-splits for debugging, etc. This would be awesome for terminal management.

@Tyriar
Copy link
Member

Tyriar commented Jan 7, 2019

@alexr00 I'm not familiar with this terminalGroup concept, there is a similar request for the terminal API, we should align these if it's possible #45407

@alexr00 alexr00 assigned alexr00 and unassigned dbaeumer Jan 8, 2019
@alexr00 alexr00 modified the milestones: On Deck, December/January 2019 Jan 8, 2019
aeschli pushed a commit that referenced this issue Jan 25, 2019
* Return splitted instance from ITerminalService::splitInstance

* Add support for terminalGroup to tasks

* Early-exit when the tab could not be split

https://github.com/Microsoft/vscode/pull/65973/files/42e3171a71ae4b6963e47318fd289a66eb48a96a#r245762395

* Use .get()! instead of the unsupported [] to access LinkedMap

* Move api changes into `vscode.proposed.d.ts`

* Rename "terminalGroup" to "group"

* Only keep references to terminals in sameTaskTerminals and idleTaskTerminals if the terminal is not disposed

* Type result variable

Fixes #47265
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 13, 2019
@alexr00 alexr00 reopened this Nov 29, 2019
@alexr00 alexr00 modified the milestones: Backlog, November 2021 Nov 15, 2021
@alexr00 alexr00 modified the milestones: November 2021, On Deck Nov 30, 2021
@alexr00 alexr00 assigned meganrogge and unassigned alexr00 Jun 30, 2022
@meganrogge meganrogge modified the milestones: On Deck, May 2023, Backlog May 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-finalization feature-request Request for new features or functionality tasks Task system issues
Projects
None yet
Development

No branches or pull requests

7 participants