macosterminalalacritty

Move cursor word by word in Alacritty


I recently started using Alacritty instead of the default Terminal.app on macOS. When using Terminal, I can jump word by word using Option with left and right arrow keys. In Alacritty this key combination is causing ;3D and ;2D to print to the screen instead of the cursor moving.

Is there a way configure Alacritty to jump word by word using Option and arrow keys?


Solution

  • With tmux and zsh, add these to the alacritty config:

    key_bindings:
      ...
      - { key: Right, mods: Alt, chars: "\x1BF" }
      - { key: Left,  mods: Alt, chars: "\x1BB" }