Home

Awesome

wez-tmux

Port tmux key bindings to WezTerm.

Installation

Clone this repository to your $XDG_CONFIG_HOME/wezterm:

git clone https://github.com/sei40kr/wez-tmux.git $XDG_CONFIG_HOME/wezterm

Usage

local wezterm = require("wezterm")

local config = {}

if wezterm.config_builder then
    config = wezterm.config_builder()
end

-- If you have your own leader key, make sure to set it before loading this
-- plugin.
config.leader = { key = "b", mods = "CTRL" }

-- Add these lines:
require("wez-tmux.plugin").apply_to_config(config, {})

return config

Key Bindings

KeyAction
leader+leaderSend leader key
leader+[Activate Copy Mode

Workspaces

KeyAction
leader+$Rename the active workspace
leader+dUnsupported
leader+sList workspaces and switch to the selected one
leader+wUnsupported
leader+(Switch to the previous workspace
leader+)Switch to the next workspace

Tabs

KeyAction
leader+cCreate a new tab in the current window
leader+,Unsupported
leader+&Close the current tab
leader+wUnsupported
leader+pActivate the previous tab
leader+nActivate the next tab
leader+1..9Activate the tab at the specified index
leader+lActivate the previously active tab

Panes

KeyAction
leader+%Split the current pane horizontally
leader+"Split the current pane vertically
leader+{Rotate the sequence of panes counter-clockwise
leader+}Rotate the sequence of panes clockwise
leader+leftActivate the pane to the left
leader+downActivate the pane below
leader+upActivate the pane above
leader+rightActivate the pane to the right
leader+qActivate the pane selection modal display
leader+zToggle the zoom state of the current pane
leader+!Create a new tab in the current window and moves the current pane into that tab
leader+ctrl+leftResize the current pane to the left
leader+ctrl+downResize the current pane below
leader+ctrl+upResize the current pane above
leader+ctrl+rightResize the current pane to the right
leader+xClose the current pane

Misc

KeyAction
leader+spaceActivate Quick Select Mode

Copy Mode

KeyAction
yCopy and exit copy mode
escapeClear selection / Clear search pattern / Exit copy mode
vCell selection
shift+vLine selection
ctrl+vRectangular selection
hMove Left
jMove Down
kMove Up
lMove Right
wMove forward one word
bMove backward one word
eMove forward one word end
0Move to start of this line
$Move to end of this line
^Move to start of indented line
shift+gMove to bottom of scrollback
gMove to top of scrollback
shift+hMove to top of viewport
shift+mMove to middle of viewport
shift+lMove to bottom of viewport
ctrl+bMove up one screen
ctrl+uMove up half screen
ctrl+fMove down one screen
ctrl+dMove down half screen
/Search forward
?Search backward
nNext keyword occurrence
NPrevious keyword occurrence

Troubleshooting

ctrl+b in Copy Mode does not work

If you don't set the leader key or explicitly set it to ctrl+b, it will conflict with ctrl+b (Move up one screen) in Copy Mode. Please set the leader key to something other than ctrl+b.