tpm(Tmux Plugin Manager)
TL;DR
tpm(Tmux Plugin Manager)はtmuxのpluginをいい感じに管理できるツール.
VimのNeoBundleやRubyのGemfileのように.tmux.confにpluginを記述することで管理を行う.
usage
tpmのインストール.
$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
.tmux.confに利用するpluginを記述.
run-shell tpmでpluginのスクリプト(*.tmux)が実行される.
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-yank \
tmux-plugins/tmux-open \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-battery \
tmux-plugins/tmux-pain-control \
'
run-shell '~/.tmux/plugins/tpm/tpm'
tmuxを起動してprefix I(shift+I)でpluginがインストールされる(NeoBudleでいうところの:NeoBundleInstall).
plugins
僕が利用しているのはこんな感じ.
- tmux-yank : システムのクリップボードにコピー
- tmux-open : URLやファイルを開く
- tmux-resurrect : セッションの保存・復元
- tmux-battery : バッテリ残量等を表示
- tmux-pain-control : pain間の移動キーバインドをつけてくれる
tmux-yankとかtmux-pain-controlは,従来だと.tmux.confにだらだら書いてたものをpluginとして抽出したもの.
こういう設定がOSSとして切りだされていくと.tmux.confがより洗練されていって素敵だと思う.
pluginの作り方はHow to create Tmux pluginsにまとめられているので自作も可能.
現状だとtpm作者が1人で頑張ってるけど,brewとかgemみたいにtpm pluginsが広まっていけば世の中がもっといい感じになっていく気がする.