Tmux/plugins/tpm
From Gentoo Wiki
Jump to:navigation
Jump to:search
Resources
TPM (Tmux Plugin Manager) manages tmux plugins in an automated manner. It is used to install and load tmux plugins.
Important
TPM can only be downloaded via github now. Requirements: tmux version 1.9 (or higher.)
TPM can only be downloaded via github now. Requirements: tmux version 1.9 (or higher.)
Installation
1. Clone TPM:
user $
mkdir -p ~/.tmux/plugins
user $
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
2. At the bottom of ~/.tmux.conf place the following (or $XDG_CONFIG_HOME/tmux/tmux.conf works too.):
# 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 '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 -b '~/.tmux/plugins/tpm/tpm'
3. Reload TMUX environment so TPM is sourced (if tmux is already running.):
user $
tmux source ~/.tmux.conf
Usage
Note
Prefix is Ctrl + b by default.
Prefix is Ctrl + b by default.
Install plugins
- Add new plugin to ~/.tmux.conf with
set -g @plugin '...'
- Press prefix + I (capital I, as in install) to fetch the plugin.
The plugin will cloned to ~/.tmux/plugins/ and sourced.
Important
TPM not config the plugin.
TPM not config the plugin.
Uninstall plugins
- Remove (or comment out) plugins from the list.
- 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
Removal
Remove files:
user $
rm -r ~/.tmux/plugins/tpm
Then clear TPM settings in ~/.tmux.conf.