1

I've configured my zsh to use ALT and left/right arrows to word left/right using the following in my ~/.zshrc file, however when I open a tmux session it doesn't work and just outputs 'D' or 'C'…

bindkey -e
bindkey '^[^[[C' forward-word
bindkey '^[^[[D' backward-word

Can anyone help my get this working?

1
  • 1
    What do you get if you execute cat and then press ALT+R-ARROW / ALT+L-ARROW?
    – mpy
    Commented Mar 10, 2018 at 20:30

1 Answer 1

0

Your escape sequences seem off. Try this instead:

bindkey -e
bindkey '^[[1;3C' forward-word
bindkey '^[[1;3D' backward-word

As mpy suggested in a comment, you should run cat and press Alt+Left and Alt+Right to be sure of the correct sequence.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .