I've configured tmux to skip words on Ctrl+right / left :

set-window-option -g xterm-keys on

It works just fine, but as I do SSH, it doesn't work and prints ;5D or ;5C..

The same issue occurred when I used screen, is there some specific configuration for tmux/screen on SSH ?

  • I don't know a solution to this, so I'm only providing a comment, not an answer. No Debian-based system has ever done this to me, but this is a common case on my CentOS systems. Just use Alt+b and Alt+f to move backward and forward respectively. My guess is this is more standard and should work without any hassle. – Erathiel Feb 26 '15 at 10:25
  • Alt+b does work, Alt+f opens the 'file' menu. But I see no reason why it wouldn't work... – SagiLow Feb 26 '15 at 10:32
  • Then you probably have a system-wide keyboard shortcut assigned to Alt+f, which overrides the terminal default. – Erathiel Feb 26 '15 at 10:35
  • What terminal are you using? Are you using gnome-terminal? – aairey Feb 26 '15 at 12:20
  • Are you using SSH inside tmux or the other way round? What escape sequence do you expect these keys to send — this isn't standardized and \e[1;5D is one of the popular choices. – Gilles 'SO- stop being evil' Feb 26 '15 at 19:23