Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make byobu forward-word and backward-word with CTRL+arrow?

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.

like image 638
yPhil Avatar asked Apr 13 '13 14:04

yPhil


3 Answers

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
like image 66
iruvar Avatar answered Nov 03 '22 13:11

iruvar


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

like image 5
yPhil Avatar answered Nov 03 '22 14:11

yPhil


The patch here correct the problem for me on Ubuntu 12.04

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

like image 2
KumZ Avatar answered Nov 03 '22 15:11

KumZ