Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Ctrl + Left/Right to move forward/back one word in tmux within Mobaxterm

Tags:

bash

tmux

When using tmux within Mobaxterm, Ctrl + Left/Right just moves the cursor forward/back one character, not one word.

In the following cases, Ctrl + Left/Right does behave as expected:

  • in bash within Mobaxterm
  • in screen within Mobaxterm
  • in tmux within Cygwin
  • in screen or bash within Cygwin

So it seems to be an issue only when combining tmux with Mobaxterm.

In all cases, I am ssh-ing to a remote linux machine, within either Cygwin or Mobaxterm. My /etc/inputrc is set as it should for the shortcuts to work.

Any clue?

like image 945
leilu Avatar asked Apr 06 '15 16:04

leilu


1 Answers

Old question. But in case someone find his way here. This is sgzmd's answer:

Edit your ~/.tmux.conf and add lines:

set-window-option -g xterm-keys on

If you don’t want to make it permanent just yet, do:

C-b :set-window-option xterm-keys on

Reload your config in tmux by doing:

C-b :source-file ~/.tmux.conf

It worked for me.

original answer here

like image 125
xyliu00 Avatar answered Oct 06 '22 17:10

xyliu00