-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Specify Panes in a Profile #3759
Comments
I have similar needs too. Having able to define a profile with multiple panes, their layout and the profile to load in each pane would be really helpful. This is probably the last thing stopping to switch from ConEmu. |
I'd love to see this implemented. I was just looking for it in the 1.0 release, in case I missed it. |
I would like for this feature to allow the user to configure multiple sub profiles within a profile. I have a test environment which composes of four hosts. I'd like to set up a profile that SSH into all of the hosts in different panes. |
There are a few ways this could be achieved:
"profiles": {
"list": [
{
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Project A",
"panes": {
"first": {
"profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
},
"second": {
"panes": {
"first": {
"profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
},
"second": {
"profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
},
"split": "vertical"
},
"split": "horizontal"
}
}
}
]
}, ...
"profiles": {
"list": [
{
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Project A",
"startupActions": [
{ "action": "splitPane", "split": "vertical", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"},
{ "action": "splitPane", "split": "horizontal", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"},
{ "action": "moveFocus", "direction": "left" },
{ "action": "splitPane", "split": "horizontal", "profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"}
]
}
]
}
"layouts":
[
{
"guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
"hidden": false,
"name": "Project A",
"panes": {
"first": {
"profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
},
"second": {
"panes": {
"first": {
"profile": "{2c4de342-38b7-51cf-b940-2309a097f518}"
},
"second": {
"commandline": "powershell.exe",
"startingDirectory": "%USERPROFILE%\\git\\ProjectA"
},
"split": "vertical"
},
"split": "horizontal"
}
}
}
]
} |
That's a great writeup @ali-hk. I think this thread needs to be better linked up to #1571, because I've been doing most of the planning for this feature in that thread unfortunately. I think the plan of record right now is to have the user be able to specify arbitrary actions in the new tab dropdown. This will let the user set something like "newTabMenu": [
{
"type":"action",
"action": { "command": "wt", "commandline": "split-pane -p cmd ; split-pane -p PowerShell" }
},
} Which would create an entry in the new tab menu which would create two new splits, with cmd and PowerShell. In the future, this might be a bit more ergonomic (rather than using the Right now, I do something similar to create a command in the command palette that opens a bunch of tabs and splits for me: {
"command":
{
"action": "wt",
"commandline": "new-tab --title OpenConsole cmd.exe /k #work 15 ; split-pane --title OpenConsole cmd.exe /k #work 15 ; split-pane -H cmd.exe /k media-commandline ; new-tab --title \"Symbols Script\" powershell dev\\symbols.ps1 ; new-tab -p \"Ubuntu 18.04\" ; new-tab -p \"microsoft/Terminal\" ; sp -V -p \"microsoft/Terminal\" ; sp -H -p \"microsoft/Terminal\" ; focus-tab -t 0"
},
"name": "Good Morning"
}, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This feature is what I want too. Also besides using profiles, I hope this can be achieved through command line / command palette without need to create complex profile: i.e. I want to create following pattern with single command/click
however, if I use wt; sp; sp; sp, it will create something like this
An ability to specify source pane in split-pane subcommand would be welcome |
Any updates updates on this? this is a much needed feature. Right now I am using a windows shortcut as a work around
There are two limitations with this
|
@skotekar - for the first bullet please see if |
Yup, I could take the same command I pass to wt.exe and put it in Thanks |
So far the best command I can get is like:
|
This is already fine for creating quite complex layouts, but is there any command already to resize a specific pane (analogue to Shift+Alt+ArrowKey)? |
I just checked (Version: 1.11.3471.0) and not that I see. Is there any reason those commands can't be duplicated as-is but allow input of a relative size by measure (pixel, character (font size col/row))? |
This is just about the only thing keeping me from switching away from Cmder/ConEmu. Personally, I'd just like a "Save as profile" option. |
FWIW, you can do something similar today with the Command Palette and the From the docs: Run multiple actionsThis action allows the user to bind multiple sequential actions to one command. Command name: Parameters
Example{ "name": "Create My Layout", "command": {
"action": "multipleActions",
"actions": [
// Create a new tab with 3 panes
{ "action": "newTab", "tabTitle": "Work", "colorScheme": "One Half Dark" },
{ "action": "splitPane", "split": "vertical", "profile": "Windows PowerShell", "tabTitle": "Work", "colorScheme": "Campbell Powershell", },
{ "action": "splitPane", "split": "horizontal", "profile": "Windows PowerShell", "tabTitle": "Work", "colorScheme": "Campbell Powershell", },
// Create a second tab
{ "action": "newTab", "tabTitle": "Misc"},
// Go back to the first tab and zoom the first pane
{ "action": "prevTab", "tabSwitcherMode": "disabled" },
{ "action": "moveFocus", "direction": "first"},
"togglePaneZoom"
]
}} |
Does "It won't be able to appear in the new tab dropdown till we complete this issue" mean that adding a multipleActions to my settings.json will have no effect right now, or can I execure it even if it dpesn't appear in the new tab dropdown? |
Today, with
To help me with command palette, I changed it to F1:
|
Are you nesting your actions block ("Development") within the context of the overall "actions" array? I'm still getting an "Incorrect type. Expected "object"." on the bracket in:
|
That's bizarre. That should absolutely work. Which version are you on? By all accounts, the json above should just work... |
Oh, it's just the schema that's wrong? That's not the end of the world - the terminal should still work, even if VsCode complains. The schema has always been more of "guidelines" than actual rules. terminal/doc/cascadia/profiles.schema.json Lines 1490 to 1511 in a2bb313
I can't say I know enough about json schema rules to understand why that doesn't work though |
Tried some other settings and, if I make something wrong, Terminal will warn me and does not load the config file, so seems to be an "error-free zone". Tip: If you want to load other profiles, like a WSL on the right side and PowerShell on the left, just change the |
Thanks. That was the idea. I have a terminal I open to four boxes (Fedora, Arch, Ubuntu, Raspbian) for demonstrations. I was tired of splitting manually ;-) |
Description of the new feature/enhancement
The ability to save a tab with panes as a profile, or specify in a profile the panes to open when you open that profile.
I Have 6 projects I work on, on a daily basis at work, so I come in, open up ConEmu, and it opens a tab with 6 panes each set to a different git directory. Then I begin working.
So I want to make a
project
profile which opens up that setup.Currently being able to make panes is awesome, but I don't want to set it up every time I accidentally close the terminal or I reboot my computer.
(I hope this matches the requirement of the template)
The text was updated successfully, but these errors were encountered: