diff --git a/docs/config/keys.markdown b/docs/config/keys.markdown index a49ccfd77..ee07a8eba 100644 --- a/docs/config/keys.markdown +++ b/docs/config/keys.markdown @@ -133,6 +133,17 @@ The default key bindings are: | `SUPER` | `f` | `Search={CaseSensitiveString=""}` | | `CTRL+SHIFT` | `F` | `Search={CaseSensitiveString=""}` | | `CTRL+SHIFT` | `X` | `ActivateCopyMode` | +| `CTRL+SHIFT+ALT` | `"` | `SplitVertical={domain="CurrentPaneDomain"}` | +| `CTRL+SHIFT+ALT` | `%` | `SplitHorizontal={domain="CurrentPaneDomain"}` | +| `CTRL+SHIFT+ALT` | `LeftArrow` | `AdjustPaneSize={"Left", 1}` | +| `CTRL+SHIFT+ALT` | `RightArrow` | `AdjustPaneSize={"Right", 1}` | +| `CTRL+SHIFT+ALT` | `UpArrow` | `AdjustPaneSize={"Up", 1}` | +| `CTRL+SHIFT+ALT` | `DownArrow` | `AdjustPaneSize={"Down", 1}` | +| `CTRL+SHIFT` | `LeftArrow` | `ActivatePaneDirection="Left"` | +| `CTRL+SHIFT` | `RightArrow` | `ActivatePaneDirection="Right"` | +| `CTRL+SHIFT` | `UpArrow` | `ActivatePaneDirection="Up"` | +| `CTRL+SHIFT` | `DownArrow` | `ActivatePaneDirection="Down"` | +| `CTRL` | `Z` | `TogglePaneZoomState` | If you don't want the default assignments to be registered, you can disable all of them with this configuration; if you chose to do this, diff --git a/docs/config/lua/keyassignment/ActivatePaneDirection.md b/docs/config/lua/keyassignment/ActivatePaneDirection.md new file mode 100644 index 000000000..cdcb5ae81 --- /dev/null +++ b/docs/config/lua/keyassignment/ActivatePaneDirection.md @@ -0,0 +1,24 @@ +# ActivatePaneDirection + +*Since: nightly builds only* + +`ActivatePaneDirection` activate an adjacent pane in the specified direction. +In cases where there are multiple adjacent panes in the intended direction, +wezterm will choose the pane that has the largest edge intersection. + +```lua +local wezterm = require 'wezterm'; + +return { + keys = { + { key = "LeftArrow", mods="CTRL|SHIFT", + action=wezterm.action{ActivatePaneDirection="Left"}}, + { key = "RightArrow", mods="CTRL|SHIFT", + action=wezterm.action{ActivatePaneDirection="Right"}}, + { key = "UpArrow", mods="CTRL|SHIFT", + action=wezterm.action{ActivatePaneDirection="Up"}}, + { key = "DownArrow", mods="CTRL|SHIFT", + action=wezterm.action{ActivatePaneDirection="Down"}}, + } +} +``` diff --git a/docs/config/lua/keyassignment/AdjustPaneSize.md b/docs/config/lua/keyassignment/AdjustPaneSize.md new file mode 100644 index 000000000..376393dd3 --- /dev/null +++ b/docs/config/lua/keyassignment/AdjustPaneSize.md @@ -0,0 +1,31 @@ +# AdjustPaneSize + +*Since: nightly builds only* + +`AdjustPaneSize` manipulates the size of the active pane, allowing the +size to be adjusted by an integer amount in a specific direction. + +If the pane is on the right hand side of a split and you adjust the size +left by 1 then the split grows larger by 1 cell by expanding its size to +the left. The pane to its left is reduced in size by 1 cell to accommodate +the growth. If you were to adjust this same right hand side right by 1 cell, +then the pane will shrink by 1 cell and move the split 1 cell to the right. + +Here's a sample configuration that uses `CTRL-A H` to increase the size +of the active pane by 5 cells in the left direction. The other `vi` style +motion keys are used to adjust the size in their conventional directions, +respectively. + +```lua +local wezterm = require 'wezterm'; + +return { + leader = { key="a", mods="CTRL" }, + keys = { + { key = "H", mods = "LEADER", action=wezterm.action{AdjustPaneSize={"Left", 5}}}, + { key = "J", mods = "LEADER", action=wezterm.action{AdjustPaneSize={"Down", 5}}}, + { key = "K", mods = "LEADER", action=wezterm.action{AdjustPaneSize={"Up", 5}}}, + { key = "L", mods = "LEADER", action=wezterm.action{AdjustPaneSize={"Right", 5}}}, + } +} +``` diff --git a/docs/config/lua/keyassignment/TogglePaneZoomState.md b/docs/config/lua/keyassignment/TogglePaneZoomState.md new file mode 100644 index 000000000..27c0f81bf --- /dev/null +++ b/docs/config/lua/keyassignment/TogglePaneZoomState.md @@ -0,0 +1,15 @@ +# TogglePaneZoomState + +*Since: nightly builds only* + +Toggles the zoom state of the current pane. A Zoomed pane takes up +all available space in the tab, hiding all other panes while it is zoomed. +Switching its zoom state off will restore the prior split arrangement. + +```lua +return { + keys = { + { key = "Z", mods="CTRL", action="TogglePaneZoomState" }, + } +} +```