Migrating to tmux as a terminator user
I’ve been a Terminator
user for a long time, and have nothing but praise for the project. The key
feature that Terminator offered to me was the simple configurability of terminal
emulators like the default Gnome or XFCE terminals, but also allowed for usage
of split panes. I’ve seen much praise for tmux
in the past, but after trying it several times in the past I’ve always had
really large issues with the default keybindings (for real, how are % and “
representative of vertical and horizontal splits?). However, I’ve finally become
annoyed enough with my ssh
workflow that I decided to give it another shot.
After a couple days my workflow feels quite natural. Two main factors that
pushed me over the edge have been
- maintaining sessions and being able to attach and detach at will
- being able to split shells within the same session (no more having to re-ssh in)
These are the key portions of my basic configuration.
Overall niceties
Before getting too into keybindings, there were some basic things that needed to
be taken care of. First, we set mouse support for when others need to do the
point and click thing. Then, fixing some coloring, and adding the lovely
tmuxline to match my vim
setup.
Finally, I noticed that there was some delay between switching modes in vim
,
so I had to set an escape timeout to make things fluid. The relevant lines are
Motion Keybinds
Then, we come to the real issue: navigation and pane management. As said, I was
a previous Terminator user and grew accustomed to the keybinds for splitting and
resizing. These don’t require any prefix key-chord to be used, so I set them up
the same way for tmux, and things seem to work well enough. On top of that, I
use Spacemacs due to evil- and
org-mode, so I wanted to have the prefix situation be similar. At that point it
seemed like using ctrl-space
was a much more natural choice than the default
of ctrl-b
. I also reassigned the prefix-level splitting operations to be
similar to SPC \
and SPC -
from Spacemacs.
Resulting situation
It’s always helpful for me to see what other people’s configurations look like in practice so here’s a screenshot of what my current setup looks like
All of the configuration for my setup can be foundin my dotfiles repository.