Wednesday, 29 February 2012

tmux and C-left/C-right

If you are using tmux (or thinking of switching) you've probably realised by now how annoying is that you can't do Control-Left and Control-Right to move between words in Bash, Emacs, Vim and what not. So was I :)

Luckily, solution was found. Here it is:

  1. 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

  2. Reload your config in tmux by doing C-b :source-file ~/.tmux.conf

Problem solved - at least in my scenario, now I have access to my precious c-left and c-right.