CTRL-a and CTRL-e map incorrectly in tmux

I like to use command-line commands CTRL-a (beginning of line) and CTRL-e (end of line), but when I start a tmux session, these commands don't work. CTRL-key seems to be interpreted as caret ^, as in the terminal I see ^A and ^E respectively. CTRL-b works without any issues.

I'm using xfce4-terminal and zshell, if that makes any difference.

Setting set -g default-terminal 'screen-256color' in .tmux.conf did not help.

Would be grateful for any help.

6

1 Answer

After making the following changes to my dot files, I was able to use emacs style key bindings also inside a tmux session.

# .zshrc
bindkey -e
# .tmux.conf
set -g mode-keys emacs
set -g status-keys emacs

This answer on StackOverflow helped me solve my issue.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like