Skip to content

Instantly share code, notes, and snippets.

@rathboma
Created November 8, 2024 17:00
Show Gist options
  • Save rathboma/0d3b7c1ad9f8c560301a003c57a97fec to your computer and use it in GitHub Desktop.
Save rathboma/0d3b7c1ad9f8c560301a003c57a97fec to your computer and use it in GitHub Desktop.
WezTerm TMUX Style keybindings
local wezterm = require 'wezterm'
return {
leader = { key = 'b', mods = 'CTRL' },
hide_mouse_cursor_when_typing = false,
keys = {
-- Split pane vertically
{ key = '"', mods = 'LEADER|SHIFT', action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' } },
-- Split pane horizontally
{ key = '%', mods = 'LEADER|SHIFT', action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' } },
-- Select next pane
{ key = 'o', mods = 'LEADER', action = wezterm.action.ActivatePaneDirection 'Next' },
{ key = 'c', mods = 'LEADER', action = wezterm.action.SpawnTab 'DefaultDomain' },
{ key = 'n', mods = 'LEADER', action = wezterm.action.ActivateTabRelative(1) },
{ key = 'p', mods = 'LEADER', action = wezterm.action.ActivateTabRelative(-1) }
}
-- Optional: Enable mouse support for easier pane switching
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment