3 Essential TMUX Customizations
You’ve installed TMUX (an essential terminal add-on), but you’re probably wondering why the default configuration is so unintuitive. Well, I’ve scoured the internet (really just Googled and read a bunch of other blog posts) to arrive at my top 3 customizations for TMUX. Nothing too fancy or complicated, just more intuitive shortcuts and workflow improvements (as well as a bonus tip). Lets get started.
How to edit your TMUX configuration
Changing your TMUX settings is as straightforward as editing the .tmux.conf file found in your home directory (e.g. ~/.tmux.conf). If you don’t already have this file, go ahead and create it before you get going
After you edit the config file, TMUX won’t pick up the changes until you manually refresh. To do this from within a TMUX session, hit the prefix shortcut (by default Ctrl-b
), then type the following proceeded by the enter key:
My essential customizations
All of these customizations will be made in your .tmux.conf file. Remember to save and reload after making changes!
1. Change the default TMUX prefix shortcut
By default you enter TMUX’s command mode by using a keyboard sequence called the prefix shortcut (by default Ctrl-b
). The default prefix was never too memorable so I much prefer Ctrl-space to mimic the way you enter Mac OSX’s spotlight search.
Add the following to your config file to change the default TMUX shortcut to Ctrl-space
:
2. Intuitive split commands
When I first started using TMUX, one of the things I found the most frustrating was remembering how to split the terminal into multiple panels - TMUX’s flagstone feature.
Mapping horizontal split to –
, and vertical split to |
is much more intuitive than the default “
and %
mappings.
Inspiration for these split commands comes from this nice article by Ham Vocke.
3. Mouse scrolling & interaction
Mouse mode enables you to use the mouse for scrolling, switching focus, and moving between windows. In my opinion, this might be the single greatest improvement to TMUX (sorry keyboard-only purists).
Thankfully in TMUX 2.0 there is now a single config option to enable mouse mode:
BONUS! - Powerline
Powerline will customize the rather basic TMUX status/window manager bar and turn it into something much more visual pleasing and useful. Although powerline is a bit beyond the scope of this post it’s definitely worth the effort, so be on the look out for my post about installing and customizing powerline for TMUX.