p:: CLI

Tmux Plugin Manager

Installation

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Put this at the bottom of ~/.tmux.conf

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

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

Reload TMUX environment so TPM is sourced:

# type this in terminal if tmux is already running
tmux source ~/.tmux.conf

Installing plugins

  1. Add new plugin to ~/.tmux.conf with set -g @plugin '...'
  2. Press prefix + I (capital i, as in Install) to fetch the plugin.
Already installed "tpm"                                                                                                                                                                                                                                                                        [0/0]
Installing "tmux-sensible"
  "tmux-sensible" download success
Installing "tmux-resurrect"
  "tmux-resurrect" download success
 
TMUX environment reloaded.
 
Done, press ESCAPE to continue.

You’re good to go! The plugin was cloned to ~/.tmux/plugins/ dir and sourced.

ls ~/.tmux/plugins
tmux-resurrect tmux-sensible  tpm

Tmux sensible

Tmux Resurrect

Key bindings

  • prefix + Ctrl-s - save
  • prefix + Ctrl-r - restore