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

Feature Request: Split windows #532

Closed
ankitbko opened this issue May 7, 2019 · 26 comments · Fixed by #825
Closed

Feature Request: Split windows #532

ankitbko opened this issue May 7, 2019 · 26 comments · Fixed by #825
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@ankitbko
Copy link
Member

ankitbko commented May 7, 2019

Consider Supporting tmux style split windows where tabs can be grouped into single window with split screens -

@zadjii-msft zadjii-msft added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 7, 2019
@zadjii-msft zadjii-msft added this to the Windows Terminal v1.0 milestone May 7, 2019
@zadjii-msft
Copy link
Member

This is probably my highest priority feature request :)

@zadjii-msft zadjii-msft self-assigned this May 7, 2019
@oising
Copy link
Collaborator

oising commented May 7, 2019

Also consider tmux compatible keybindings ;)

@zadjii-msft
Copy link
Member

Since the keybindings will be remappable, you'll be able to set them to whatever you like :)

Though, I'll make sure they don't conflict with tmux out of the box.

@bennycornelissen
Copy link

If we're looking at tmux for things like splits, why not implement Tmux Control Mode like iTerm on MacOS. I switch back and forth between my Macs (with iTerm2) and my Surface Laptop with WSL but WSL2 combined with a really usable terminal (comparable to iTerm2) would really make me consider leaving the Apple camp.

@zadjii-msft
Copy link
Member

I did not know that Tmux Control Mode even existed.

That sounds really awesome, I'm totally on board with trying to make that work somehow.

@dzek69
Copy link

dzek69 commented May 8, 2019

+1, but it definitely should support tabs of different consoles - I mean Powershell aside to WSL bash for example.

Plus I'd like it to be more like Vivaldi's browser management of tabs tiling (you can ctrl+click tabs and tile/untile them freely from context menu) than ConEmu console emulator (where you can just "split to right/bottom", which creates new console, but I cannot easily tile two existing tabs).

@mdtauk
Copy link

mdtauk commented May 9, 2019

You should be able to split tab above and below as well as to the left or right.

@eric-belhomme
Copy link

+1 !!!
I'm a big fan of Gnome Terminator and term splitting is IMHO a must-have (even more important than tabbed terminals) for a decent terminal emulator !
https://gnometerminator.blogspot.com

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@BladeFireLight
Copy link

I would love it if each of the split window could run as a different account.

@DHowett-MSFT DHowett-MSFT added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@zadjii-msft
Copy link
Member

Man it's a really great thing this is in pr (#825) then ;)

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Jun 7, 2019
@zadjii-msft zadjii-msft added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Jun 7, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 7, 2019
@brunolm
Copy link

brunolm commented Jun 23, 2019

Is this in the preview? How do I use it? Couldn't find any option and/or kb shortcut

@hypermagicmountain
Copy link

hypermagicmountain commented Jun 27, 2019

@brunolm

Is this in the preview? How do I use it? Couldn't find any option and/or kb shortcut

Add this to the Keybindings in the settings and adjust the keys as your like.

           {
                "command" : "splitHorizontal",
                "keys" : 
                [
                    "ctrl+shift+-"
                ]
            },
            {
                "command" : "splitVertical",
                "keys" : 
                [
                    "ctrl+shift+E"
                ]
            },

@alnutile
Copy link

alnutile commented Jul 4, 2019

iTerm on the Mac has a split left/down feature as well. I rather not use tmux if not needed and have it built into the terminal esp shortcuts like ctrl+shift+w for wide etc

@manmartgarc
Copy link

Is there a way to switch between the panes, after being split? Thanks!

@zadjii-msft
Copy link
Member

@manmartgarc This is tracked by #995, and in pr in #1910

@hypermagicmountain
Copy link

hypermagicmountain commented Jul 17, 2019

This is how I work with Conemu every day. It will start up like in the picture. 3 times bash and 1 powershell. I have keybindings for adding more panes horizontally or vertically (will be the same profile as the currently selected one), and for switching between fullscreen and split mode. For me this is the perfect way to handle multiple shells. I hope the Windows Terminal will work similar, especially with the startup profile and the keybindings to switch between full/split view.

Conemu four panes

@dacarey
Copy link

dacarey commented Jul 17, 2019 via email

@DJPoland
Copy link

DJPoland commented Jul 25, 2019

@zadjii-msft is there a command for switching between panes with a hotkey rather than clicking between each pane for the splitHorizontal/vertical commands? I went to that pull request #1920 but wasn't able to figure it out. Maybe it's because I have the windows store version of the terminal...?

@zadjii-msft
Copy link
Member

@DJPoland The store version doesn't have #1920 in it quite yet. You'll need to wait for 0.3 to be pushed to the store.

@DJPoland
Copy link

@zadjii-msft sweet. Is there any way I can split to a new pane and the child pane that was just spawned would be in the same directory as the root pane? In other words, I don't want to cd to the same directory for each pane.

@zadjii-msft
Copy link
Member

I'm not sure that's possible. Do all processes (including pico-processes used by WSL) have a current working directory? Is it possible for us to query that value from a child process? What if there are multiple processes attached to the console simultaneously, how do we pick which process's working directory to use?

Not saying that it's straight-up impossible, just that it's very unlikely and definitely deserves it's own thread to discuss and spec.

@chgeuer
Copy link
Member

chgeuer commented Aug 9, 2019

What's slightly confusing is that new splitted windows do not have the same shell as the original window. My default is WSL, but when I have a PowerShell windows, and split it, then the 2nd half isn't powershell as well, but WSL. I kind-of expected that splitting an existing Window gives me the same shell.

image

@DHowett-MSFT
Copy link
Contributor

Yes, this is covered in #1000. Please look at #1000 to see what we know we still need to do for panes.

@richardszalay
Copy link
Contributor

Here's the config I used:

CTRL+SHIFT+- Split horizontal
CTRL+SHIFT+| Split vertical
CTRL+ALT+U/D/L/R Move focus between panes
ALT+SHIFT+U/D/L/R Resize pane
CTRL+SHIFT+W Close current pane

{
    "command" : "splitHorizontal",
    "keys" : ["ctrl+shift+-"]
},
{
    "command" : "splitVertical",
    "keys" : ["ctrl+shift+|"]
},
{
    "command" : "moveFocusUp",
    "keys" : ["ctrl+alt+up"]
},
{
    "command" : "moveFocusDown",
    "keys" : ["ctrl+alt+down"]
},
{
    "command" : "moveFocusLeft",
    "keys" : ["ctrl+alt+left"]
},
{
    "command" : "moveFocusRight",
    "keys" : ["ctrl+alt+right"]
},
{
    "command" : "resizePaneUp",
    "keys" : ["shift+alt+up"]
},
{
    "command" : "resizePaneDown",
    "keys" : ["shift+alt+down"]
},
{
    "command" : "resizePaneLeft",
    "keys" : ["shift+alt+left"]
},
{
    "command" : "resizePaneRight",
    "keys" : ["shift+alt+right"]
},
{
    "command" : "closePane",
    "keys" : ["ctrl+shift+w"]
}

@rishavs
Copy link

rishavs commented Aug 22, 2019

Also need to ability to resize the panes using the mouse cursor. That would be the normal panel behavior in most OS UX.

@zadjii-msft
Copy link
Member

You know what, I'm just gonna lock this thread in favor of #1000. Literally any questions should just be handled there, as it is the megathread tracking all panes things.

Go to ---> #1000 <---

@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.