From Gentoo Wiki
< Tmux‎ | plugins
Jump to: navigation, search

TPM (Tmux Plugin Manager) manages tmux plugins in an automated manner. It is used to install and load tmux plugins.

TPM can only be downloaded via github now. Requirements: tmux version 1.9 (or higher.)


1. Clone TPM:

user $mkdir -p ~/.tmux/plugins
user $git clone ~/.tmux/plugins/tpm

2. Put this at the bottom of .tmux.conf ($XDG_CONFIG_HOME/tmux/tmux.conf works too.):

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

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin ''
# set -g @plugin ''

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

3. Reload TMUX environment so TPM is sourced (if tmux is already running.):

user $tmux source ~/.tmux.conf


Prefix is Ctrl + b by default.

Install 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.

The plugin will cloned to ~/.tmux/plugins/ and sourced.

TPM not config the plugin.

Uninstall plugins

  1. Remove (or comment out) plugins from the list.
  2. Press prefix + Alt + u (lowercase U as in uninstall) to remove the plugin.

All the plugins are installed to ~/.tmux/plugins/ so alternatively you can find plugin directory there and remove it.

Key bindings

  • prefix + I: Install new plugins from GitHub or any other git repository. And Refreshes TMUX environment.
  • prefix + U: Update plugins.
  • prefix + Alt + u: Remove/uninstall plugins not on the plugin list.

More plugins

For more plugins, check tmux-plugins


Remove files:

user $rm -r ~/.tmux/plugins/tpm

Then clear TPM settings in ~/.tmux.conf.