Home/End keys do not work in tmux

前端 未结 8 1741
无人及你
无人及你 2021-01-30 10:37

I\'m currently using tmux with xterm-256color $TERM variable. When in bash under tmux, pressing home/end would insert tilde characters (~). Outside of tmux the home/end keys wor

8条回答
  •  灰色年华
    2021-01-30 11:00

    In my case it was a problem with zsh in tmux (bash in tmux was ok). None of the other anwsers here worked for me.

    But adding this to .zshrc fixed it:

    bindkey "\E[1~" beginning-of-line
    bindkey "\E[4~" end-of-line
    

    Besides that I also have:

    bindkey "\E[H" beginning-of-line
    bindkey "\E[F" end-of-line
    bindkey "\E[3~" delete-char
    

提交回复
热议问题