microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.96k stars 8.35k forks source link

old version of splitHorizontal is not working #5637

Closed tlsalex closed 4 years ago

tlsalex commented 4 years ago

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.778]
Windows Terminal version (if applicable): v0.11.1191.0

Any other software?

Steps to reproduce

delete all old configuration, and terminal generate a new one , then copy and past my old version's key binding into keybinding section ,e.g. {"command" : "splitHorizontal","keys" : ["ctrl+shift+m"]},

Expected behavior

a new pane will appear Horizontally

Actual behavior

Nothing happen. I know the new version is something like this: { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } but it always split pane vertically. How to make it split pane horizontally? Any example configuration for other key binding?

CannedFish commented 4 years ago
{
  "keybindings": [
    { "command": {"action": "splitPane", "direction": "horizontal"}, "keys": ["ctrl+shift+s"] },
    { "command": {"action": "splitPane", "direction": "vertical"}, "keys": ["ctrl+shift+h"] }
  ]
}

Same issue here with settings above.

zadjii-msft commented 4 years ago

@tlsalex You're absolutely correct, splitHorizontal and splitVertical were deprecated in 0.11. To achieve the same effect, I'll refer you to how they're defined in defaults.json https://github.com/microsoft/terminal/blob/db5d2fe0a5f4664c62ca0696a9c4bc14874ae66c/src/cascadia/TerminalApp/defaults.json#L309-L310

@CannedFish Your bindings don't work because the argument isn't direction, it's split 😄

CannedFish commented 4 years ago

@CannedFish Your bindings don't work because the argument isn't direction, it's split 😄

@zadjii-msft Sorry, my mistake. And Thanks.