tmux のプラグイン管理にtpmを使ってみた

tmux

tpmとは

tpmとはtmuxのためのプラグインマネージャらしいです。
(そもそもtmuxにプラグインがあったことすら知らなかった…)

使い方

tmuxをすでに導入している前提で記載します。

インストール

$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
.tmux.confの最後に以下を記載する。

# 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 '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'

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

tmuxを起動している場合はリロードする。
$ tmux source ~/.tmux.conf

プラグインのインストール

インストールしたいプラグインを以下の形式で.tmux.confに追記する。

set -g @plugin 'github_username/plugin_name'

tmuxを起動中にprefix + I(大文字)でインストール

プラグインのアンインストール

プラグインの記述を消すか、コメントアウトして、tmuxを起動中にprefix + alt + uでアンインストール

 

それでは良きtmuxライフを!!

コメント