wezterm: Change pane movement mappings

Added mapping `<leader><c-q>` to select a pane which will be moved out
to a new tab.

Slightly changed pane switching on `<leader><s-q>` to keep focus on the
pane instead of switching to the other pane.

Finally, added two simple relative tab movement maps to cycle forward
with `<leader>.` and reverse with `<leader>,`. This replaces the old tab
movement (moving the actual tab around) left and right which are now on
`<leader><s-,>` and `<ledaer><s-.>` respectively.
This commit is contained in:
Marty Oehme 2024-08-13 22:32:49 +02:00
parent bec8f4e2e7
commit 2dd5f6e02d
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 13 additions and 8 deletions

View file

@ -662,3 +662,5 @@ command! cmp : if expand('%%c') == expand('%%f')
\ | echo expand('Comparing files: %%"f ...')
\ | cmpinternal %f
\ | endif
" pasting symlinks: al (absolute) or rl (relative)"

View file

@ -35,6 +35,7 @@ local keys = {
mods = "CTRL",
action = act.EmitEvent("ActivatePaneDirection-right"),
},
{ key = "p", mods = "LEADER", action = act.ActivatePaneDirection("Prev") },
{ key = "x", mods = "LEADER", action = act.CloseCurrentPane({ confirm = false }) },
{ key = "z", mods = "LEADER", action = act.TogglePaneZoomState },
{ key = " ", mods = "LEADER", action = act.RotatePanes("Clockwise") },
@ -42,11 +43,18 @@ local keys = {
{
key = "Q",
mods = "LEADER",
action = act.PaneSelect({ mode = "SwapWithActive" }),
action = act.PaneSelect({ mode = "SwapWithActiveKeepFocus" }),
},
{
key = "q",
mods = "LEADER|CTRL",
action = act.PaneSelect({ mode = "MoveToNewTab" }),
},
{ key = "c", mods = "LEADER", action = act.SpawnTab("CurrentPaneDomain") },
{ key = ",", mods = "LEADER", action = act.MoveTabRelative(-1) },
{ key = ".", mods = "LEADER", action = act.MoveTabRelative(1) }, -- workspace selection
{ key = ",", mods = "LEADER", action = act.ActivateTabRelative(-1) },
{ key = ".", mods = "LEADER", action = act.ActivateTabRelative(1) }, -- workspace selection
{ key = "<", mods = "LEADER|SHIFT", action = act.MoveTabRelative(-1) },
{ key = ">", mods = "LEADER|SHIFT", action = act.MoveTabRelative(1) }, -- workspace selection
{
key = "s",
mods = "LEADER",
@ -94,11 +102,6 @@ local keys = {
}),
},
{ key = "e", mods = "LEADER", action = act.EmitEvent("edit-scrollback") },
{
key = "l",
mods = "LEADER",
action = act.EmitEvent("ActivatePaneDirection-Right"),
},
{ key = "a", mods = "CTRL|ALT", action = act.EmitEvent("toggle-leader") },
{ key = "t", mods = "LEADER", action = act.EmitEvent("toggle-tabbar") },
{ key = "Enter", mods = "CTRL", action = wezterm.action({ SendString = "\x1b[13;5u" }) },