6

When used in uxterm zsh is jumping words when I press ctrl+left and ctrl+right. When used in plain unconfigured byobu (tmux backend) it is not. The cursor sits there doing nothing.

I can however achieve that by using alt+b and alt+f, but I'd really like to use ctrl+arrow in keeping with general system-wide ergonomics.

yPhil
  • 8,049
  • 4
  • 57
  • 83
  • I tried running both screen and tmux separately and they both block the ctrl+arrow motions. So it seems the problem affects both backends of byobu. – yPhil Apr 13 '13 at 14:19

3 Answers3

7

Create ~/.byobu/.tmux.conf with this value:

set-window-option -g xterm-keys on

Then add the following to ~/.byobu/keybindings.tmux

unbind-key -n C-Left
unbind-key -n C-Right
iruvar
  • 22,736
  • 7
  • 53
  • 82
  • I would really have liked it to work (Ubuntu 12.04 / Unity / Standard Byobu with Tmux backend) But thank you anyway. – yPhil Apr 16 '13 at 17:51
  • @xaccrocheur, interesting. I tested this out on Ubuntu 12.10 /Unity/ Byobu before posting and it worked for me..puzzling. – iruvar Apr 16 '13 at 18:15
  • @xaccrocheur, dumb question perhaps but did you restart byobu after applying config changes? – iruvar Apr 16 '13 at 18:21
  • Each time I exit all byobu windows by C-d back to gnome-terminal, and re-launch byobu. I tested some ~/.byobu/.tmux.conf edits, and it does indeed re-sources it. – yPhil Apr 16 '13 at 18:44
  • My problem was with M-Left and M-Right instead of C. – Druska Jan 03 '14 at 20:25
5

OK, I found a workaround :

bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word

in ~/.zshrc

To find out the arcane key code I had to cat -v and enter them. Gosh my productivity went up 15%.

yPhil
  • 8,049
  • 4
  • 57
  • 83
2

The patch here correct the problem for me on Ubuntu 12.04

https://code.launchpad.net/~jake-biesinger/byobu/byobu/+merge/126830

KumZ
  • 565
  • 12
  • 20