How do we restore ctrl-left / ctrl-right to jump a word?

Asked by Callum Macdonald

In previous versions of byobu, ctrl-left and ctrl-right would jump a word. They have now been mapped to resize split screens. Simply unmapping they keys doesn't have the desired effect. How do we restore the behaviour from previous byobu versions where ctrl-left would jump one word left on the command line?

Question information

Language:
English Edit question
Status:
Solved
For:
byobu Edit question
Assignee:
No assignee Edit question
Solved by:
Callum Macdonald
Solved:
Last query:
Last reply:
Revision history for this message
Callum Macdonald (chmac) said :
#1

I found a workaround. Changing ~/.byobu/backend to BYOBU_BACKEND=screen worked for me. I had to press ctrl-a and choose either screen or emacs mode for ctrl-right to work. Now I'm back to jumping words and I think my productivity just went up 15%. :-)

Revision history for this message
Mandx (gmandx) said :
#2

Changing ~/.byobu/backend to BYOBU_BACKEND=screen does not works for me :( I have to manually edit /usr/share/byobu/keybindings/f-keys.screen and comment the lines with:

bindkey "^[[1;5D" resize -1 # ctrl-left | resize -1
bindkey "^[[1;5C" resize +1 # ctrl-right | resize +1

But this breaks with every update! How to make this permanently, and saved in the home config dir?

Revision history for this message
Callum Macdonald (chmac) said :
#3

One solution was to switch the backend to screen. However, I had recurring issues with ctrl-right when I did that.

I subsequently found a much better solution using tmux from bug #945069. Create ~/.byobu/.tmux.conf with this value:

set-window-option -g xterm-keys on

Then ~/.byobu/keybindings.tmux with:

unbind-key -n C-Left
unbind-key -n C-Right

Now ctrl-left and ctrl-right jump one word at a time in tmux.

Revision history for this message
Sebastock (sebastock) said :
#4

Thanks Callum, works perfectly!