Skip to content

Instantly share code, notes, and snippets.

@tahir-hassan
Created January 6, 2023 13:04
Show Gist options
  • Save tahir-hassan/cdde8b78c6e3a4a876de5bea4572ec06 to your computer and use it in GitHub Desktop.
Save tahir-hassan/cdde8b78c6e3a4a876de5bea4572ec06 to your computer and use it in GitHub Desktop.
WezTerm - Configuration to send Control-w in response to Control-Backspace

On Windows, you should be able to create a .wezterm.lua in $HOME (which is really just $HOMEDRIVE + $HOMEPATH).

Here is a sample .wezterm.lua which sends a Control-w in response to Control-Backspace, useful for deleting a word behind the cursor:

local wezterm = require 'wezterm'
local act = wezterm.action

return {
    keys = {
        {
            key = 'Backspace',
            mods = 'CTRL',
            action = act.SendKey { key = 'w', mods = 'CTRL' }
        }

    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment