After multiple terminals are added, it would be useful to see multiple terminals at once. Open question: how does focus interact with tabs and splits?
Are you proposing to be able to split the panel side by side like the editor?
@bpasero Atom's term3 has the capability apparently, the package doesn't seem to be working for me though. Would want to see if it's a reasonable experience first.
@Tyriar oh I see so the terminal itself would split in the panel, we would not add splitting support to the panel?
@bpasero yes, this would be contained within the specific panel. Not to be confused with https://github.com/Microsoft/vscode/issues/7161
Another issue that's related to this: Add maximize panel command #7314
Would be great to be able to split integrated terminal / task output in the bottom pane.
@bargeruns that would be this one https://github.com/Microsoft/vscode/issues/7161 :smiley:
Personally I prefer sticky tabbing instead of window splitting as the window size is always too small ... something like tmux window would be great :)
Going to close this off in favor of programs like tmux and screen which seem to work just fine within vscode
Reopening, I'm probably not going to learn tmux personally but would definitely find this useful. Also I don't think there is a solution on Windows.
And I'm not sure tmux/screen would help those of us who use PowerShell in their terminal window.
@rkeithhill yeah that's one of the reasons I reopened, there's a similar discussion on this topic in https://github.com/Microsoft/vscode/issues/10546
@Tyriar
Right for windows it doesn't work, and VSCode could provider more appropriate and convenient solution for naming navigating spited terminals. I would even consider some more flexible UI for terminals, for example where you could change split (or all) terminals amount and their size.
So I set my shell to bash.exe
and everything was working fine up until the newest update.
Now tmux can only cover half the width of the terminal instead of all of it 馃
Opened a new issue since this a bug: #24630
@Tyriar Isn't it possible anyhow currently create a terminal in editor pane? (via API)?
@whitecolor track that in this issue https://github.com/Microsoft/vscode/issues/2806
Any progress in this issue?
A little, I started working on it one afternoon I was free here https://github.com/Microsoft/vscode/tree/tyriar/7504, I don't think it's in a usable state yet or anything. This is mainly waiting on me freeing up to be able to focus on it more, right now my priorities are accessibility and polishing some of the recent features (selection, links) https://github.com/Microsoft/vscode/issues/30209
Okay, thanks for the update. Looking forward that this feature is actually considered! 馃挓
@Tyriar you are working on splitting terminal that still in the bottom or terminal that can be aligned vertically for example?
@whitecolor that splitting branch was purely about splitting within the terminal panel, but being able to have arbitrary horizontal/vertical splits similar to terminator. One concern which I'm sure will be discussed with the team in time is that will behave vastly different to splitting in the editor.
No date in sight for this work as I have higher priority stuff I'm on currently. This is something I look into in my spare time when I motivated atm.
@Tyriar split screen could be really good feature for the integrated terminal. As an example I posted iTerm2 screenshot.
Bump, needing to use tmux for this, would prefer a native splitscreen :'(
While using tmux to solve this problem is great on _*nix/WSL_, not needing tmux to _just_ split panes (it does a lot more) would be much appreciated! 馃帀
Things like powershell/cmd don't have multiplexers so it would be nice in those environments as well 馃槃
In addition it would be nice if all output from different terminal could be written (one line of the other) to a common output. Maybe prefixed by some identifier.
This would be great for micro service dev.
@millergarym use docker
and docker-compose
for "micro service dev", it does the thing.
@whitecolor you are assume that everyone doing micro server dev is using docker.
@millergarym well it is just the advice, as docker-compose is a really nice platform for developing micro services. Your request is definitely out of the scope of the editor's functionality. If you can not find a ready solution that suits your needs, it is not difficult to create a terminal application that does this kind of thing (launches processes and combines outputs into single stdout), actually I do it for some of my tasks, with nodejs it is a few lines of code (of course I don't assume that everyone doing nodejs 馃槂).
the day this issue closed, it will be a breaking news for Windows world.
We will only launch our powershell from VSCode terminal instead of the traditional powershell.exe :)
@Tyriar
Please put this issue in your next sprint, please, please ,please
@Tyriar ,
Is it possible (or planned) to let VSCode to attach an external GUI application, than I can attach cmder, or even chrome.
I tried to attach VScode inside Cmder, it works, but seems that it has some limitations.
Is it possible (or planned) to let VSCode to attach an external GUI application, than I can attach cmder, or even chrome.
@copdips that's a pretty hacky solution that will pretty much always have limitations. The VS Code terminal is a fully fledged terminal emulator which works across platforms and provides cool integrations with VS Code, so that's the focus.
I believe this feature is planned for the next 6 months 馃槂
I'll be looking at this feature some time over the next several months, I'd like to hear any opinions people have on the UX. One possible design is to give a set of commands something like this:
workbench.action.terminal.splitRight
workbench.action.terminal.splitLeft
workbench.action.terminal.splitUp
workbench.action.terminal.splitDown
workbench.action.terminal.focusPaneRight
workbench.action.terminal.focusPaneLeft
workbench.action.terminal.focusPaneAbove
workbench.action.terminal.focusPaneBelow
workbench.action.terminal.focusPaneNext
workbench.action.terminal.focusPanePrevious
workbench.action.terminal.closePane
These commands will then drive all the behavior. Here are some examples of how I the "split panes" would work.
Imagine you have a regular terminal:
| 1st |
-------
You split right:
| ----- ----- |
| |1st| |2nd| |
| ----- ----- |
---------------
Now the "2nd" pane is focused, notice that "1st" and "2nd" get wrapped in a larger (virtual) container that holds them both.
Splitting down would then give:
| ----- --------- |
| |1st| | ----- | |
| | | | |2nd| | |
| | | | ----- | |
| | | | ----- | |
| | | | |3rd| | |
| | | | ----- | |
| ----- --------- |
-------------------
"3rd" is now focused, notice how both "2nd" and "3rd" are also contained within another container and "1st" is extra tall now.
That's just one line of thinking currently, even with this design there are plenty of questions:
Personally, I wouldn't worry about squashing - you currently don't with the editor panes. Content just overflows with horizontal scrollbars. I can also currently open up a maximum of 3 editor panes with no vertical stacking... seems like a great place to start with the terminal too... If it isn't broken, don't fix it... ;-)
I'd say the same for styles: copying the editor style seems like a great way forward.
The only point I'd say is having the option of closing each individually, so moving the 'close panel' icon onto each individual terminal seems essential...
very happy to see that the splitting in terminal is already in vscode's 2018 roadmap :
https://github.com/Microsoft/vscode/wiki/Roadmap
Can't wait for this to happen. One Terminal for overseeing the automated build process (e.g. ng serve) and and one for installing dependencies, creating angular modules with cli etc...
This system is quite different to the editor splitting system which is a concern. My thinking is that this is needed as I see a lot of terminal set ups that have splits in both directions. Should #14909 be considered while we're designing this?
After thinking about this more they are just completely different features. When/if terminals move to tabs that can be moved around, we would still want to retain the split layout within each tab. If each split itself was a tab that would make managing them difficult Consider how Hyper does this, there can be multiple tabs, each with their own split layouts and they can be switched to and from:
So this issue may inform the design of a grid layout (#14909) in the future, but they are really separate features. Splits in the terminal are persistent layouts consisting of multiple terminals within a tab. Another thing that reinforces this idea is that we definitely wouldn't want the large editor style tabs at the top of each split as that would consume too much room.
After splits is in, the following feature requests will probably become much more desirable:
A preview of the terminal split support has landed in insiders. Currently you can only split a single terminal "group" once vertically (you will be able to do more later), use 鈱楧 on macOS or search "split" in the command palette on Windows/Linux (feedback on keybinding is welcome). You can navigate between the splits using alt+cmd+left/right on macOS or alt+left/right on Windows/Linux.
"split" in the command palette on Windows/Linux (feedback on keybinding is welcome)
I'm used to have Alt+Shift+Arrow(Left|Right). But that only works on German keyboards.
@jens1o is that based on another terminal's defaults? Also is that to split left/right or focus left/right?
is that based on another terminal's defaults? Also is that to split left/right or focus left/right?
It's to split, focusing is done by the mouse cursor(perhaps Tab when screenreader mode).
I had set that, because I've got used to it, but I don't know anymore how I invented those mappings.
@jens1o ah ok, currently the thinking is to just have a split horizontal/vertical as opposed to split to left/right to simplify it a bit. Good to know though :smiley:
Focusing right/left would be v nice.
key bindings are one of the first things I change post vscode install.
Here are my two for terminalFocus navigation.
{
"key": "ctrl+tab",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+tab",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
Here's an update of things that have changed since my last comment:
We also decided to restrict splitting to a single dimension for the time being to simplify the UX and implementation. We could always add splitting both vertically and horizontally at the same time later if needed (eg. if you can pull the terminal/panel out into a different window or https://github.com/Microsoft/vscode/issues/34442 in the future).
Most of this will be in Monday's build in a few days.
Things left to do:
+
button to split https://github.com/Microsoft/vscode/issues/43877This is awesome news! Thanks @Tyriar 馃檹
Thanks @Tyriar great implementation 馃檹
I would propose selecting a different keybinding for Windows, since this would override the default keybindings of PSReadLine, which comes preinstalled since PowerShell 5.
Maybe alt + shift + arrow?
@felixse we generally stay away from alt for default keybindings, ctrl+shift+d has other issues though as it is used to toggle the debug viewlet.
@Tyriar Great work. This may be far fledged. But can this be a future implementation: https://user-images.githubusercontent.com/688617/30918650-2a2db238-a36d-11e7-95ff-8bb25b6d43fe.gif
This was mentioned by @plmrry in https://github.com/Microsoft/vscode/issues/10546
Cheers for the great work you guys do.
@tvvignesh you would probably _also_ be able to do that if these 2 issues got resolve https://github.com/Microsoft/vscode/issues/10546 https://github.com/Microsoft/vscode/issues/14909
@Tyriar
So many thx for this great job, although we have only the vertical split for the moment, it's already awesome for us.
BTW, I suggest to create a new repo which has only the terminal part (maybe we can also keep the extension part), and let anyone others to contribute to this magical powershell console.
@copdips I've heard that a lot this week 馃槃, tracked in https://github.com/Microsoft/vscode/issues/34442
I've pushed a change to the keybindings, cmd+d has been dropping in favor of ctrl/cmd+\ so that splitting the terminal uses the same keybinding as the editor:
Primary: ctrl+\ (mac: cmd+)
Secondary: ctrl+shift+5
Am using this now. I will never go back.
This is awesome! What's the keybinding for switching keyboard focus between split windows?
@willisplummer alt+arrow or cmd+alt+arrow
@Tyriar I haven't been able to find quick keybind or command for closing the currently focused terminal panel. Is that possible/in the works?
@brennongs I was looking for the same thing. Turns out you can add a key binding for workbench.action.terminal.kill
and it will close the currently focused pane:
{
"key": "cmd+w",
"command": "workbench.action.terminal.kill",
"when": "terminalFocus"
}
(in keybindings.json
)
@Tyriar what about splitting terminal horizontally?
@brennongs there is no default keybinding for this.
@whitecolor you can only do that if the panel is vertical currently. See https://github.com/Microsoft/vscode/issues/7504#issuecomment-366422361
@Tyriar ok
I didn't notice that it can be veritical. Maybe if it would be possible to have multiple terminal panes as editor panes and possible to split editor panes vertically and horizontally (like in VIM). Then there would be no need for terminal's split. =)
@whitecolor there's a different between splitting tabs in multiple directions and splitting panes though.
Most helpful comment
Are you proposing to be able to split the panel side by side like the editor?