LoginSignup
161
146

More than 5 years have passed since last update.

【tmux】tpmでplugin管理して快適ターミナル生活

Last updated at Posted at 2015-02-01

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)が実行される.

.tmux.conf
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-pain-controlは,従来だと.tmux.confにだらだら書いてたものをpluginとして抽出したもの.
こういう設定がOSSとして切りだされていくと.tmux.confがより洗練されていって素敵だと思う.

pluginの作り方はHow to create Tmux pluginsにまとめられているので自作も可能.
現状だとtpm作者が1人で頑張ってるけど,brewとかgemみたいにtpm pluginsが広まっていけば世の中がもっといい感じになっていく気がする.

参考

161
146
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
161
146