なっく日報

技術やら生活やらのメモ

tmuxのsynchronize-panes小ネタ

synchronize-panes便利ですよね?(複数ペインに同時にキー入力を送れるやつ。複数サーバの同時操作とかに重宝)

stackoverflow.com

で見つけて知ったのですが、

bind e setw synchronize-panesな感じで、on/offを明示しなければ、同一のキーバインドでsynchronize-panesをon/offできるそう!

ワンモアシング!

unbind e
bind e setw synchronize-panes\; display-message "synchronize-panes #{?pane_synchronized,on,off}"

な感じで書けば、on/off時にどっちの状態かメッセージを出せます。