Home/End keys do not work in tmux

前端 未结 8 1730
无人及你
无人及你 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:12

    From tmux FAQ:

    PLEASE NOTE: most display problems are due to incorrect TERM! Before reporting problems make SURE that TERM settings are correct inside and outside tmux.

    Inside tmux TERM must be "screen", "tmux" or similar (such as "tmux-256color"). Don't bother reporting problems where it isn't!

    Outside, it should match your terminal: particularly, use "rxvt" for rxvt and derivatives.

    Add the following command to your ~/.tmux.conf:

    set -g default-terminal tmux-256color
    

    PS: any solution involving binding the keys explicitly is a hack, and as such bound to fail.

提交回复
热议问题