A few days ago I blogged about my move to vim. When setting up my vimrc
I wanted to use Byobu’s native keybindings with it.
This post explains what Byobu is, Why use it and how to integrate it with Vim.
What is Byobu?
Byobu is an enhancement for the tmux terminal multiplexer that can be used to provide on-screen notification or status, and tabbed multi-window management. It is intended to improve terminal sessions when users connect to remote servers.
Why not just use tmux?
I just migrated from Terminator to tmux and decided that until I wrap my head around vim, I’ll postpone learning a new tool, which is where Byobu come into play. Byobu’s author, Dustin Kirkland, provided a very detailed answer on the subject.
Integrating Byobu with Vim
Byobu provides comfortable keybindings for split navigation out-of-the-box. You can set up your vim to integrate with Byobu’s keybindings easily:
Install vim-tmux-navigator, then edit your vimrc
and add these lines:
let g:tmux_navigator_no_mappings = 1 |
Now edit /usr/share/byobu/keybindings/f-keys.tmux
and comment out:
bind-key -n S-Up display-panes \; select-pane -U |
Then add the following lines:
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ |