Home/End keys do not work in tmux

前端 未结 8 1544
无人及你
无人及你 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条回答
  •  猫巷女王i
    2021-01-30 11:07

    So I don't have enough points to comment,so I'll say it here instead. I believe the preferred solution is using set -g default-terminal "screen-256color" in your ~/.tmux.conf. I actually had this problem a while ago and decided to go with sumanta's solution :

    bind -n End send-key C-e
    bind -n Home send-key C-a
    

    However I had forgotten I left this in here and ended up having a similar issue with vim (home and end were copy pasting from registers) instead of zsh. In short bind DOES affect vim.

提交回复
热议问题