I have a bind in vim for F5 key to trim whitespaces and I'm unable to use it in tmux. Instead of that letter "T" appears. Is there's any solution for that?

Actually it was working in putty, now I've switched to Xshell4.
Can this be TERM issue? inside tmux $TERM is screen


1 Answer 1


Does you .tmux.conf contain any lines that set default-terminal?

Assuming Xshell4 emulates xterm (check that $TERM is xterm within your shell outside of tmux...

Then try adding the following to your .tmux.conf

# xterm-style function key sequences
setw -g xterm-keys on

Also check what the term and ttytype variables are within Vim (inside tmux).

  • You mean $TERM? Commented Nov 21, 2014 at 9:22
  • No. I mean term. In vim try :set term?
    – sjbx
    Commented Nov 21, 2014 at 15:18

You must log in to answer this question.

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