Tmux.conf

The Basics

I find it annoying that C-b is the default prefix for Tmux. I assign it to C-\ so it’s out of the way and it’s something I have to hit on purpose.

unbind C-b
set -g prefix C-\ # My key
bind C-\ send-prefix
set -g mouse on

Tmux Plugins

This requires the Tmux plugin manager, which can make a lot of things better. The important one is tmux-yank, which makes the tmux clipboard work in MacOS – just select while holding Option. And tmux-resurrect is pretty amazing. Basically re-starts the session from the places where you last saved

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'