Skip to content

Instantly share code, notes, and snippets.

@honbin
Created October 11, 2012 08:51
Show Gist options
  • Save honbin/3871080 to your computer and use it in GitHub Desktop.
Save honbin/3871080 to your computer and use it in GitHub Desktop.
tmuxinator

tmuxinatorとは

tmuxで起動するセッション定義を事前に設定できるツール

事前に必要な環境

  • tmux
  • gem

インストール方法

$ gem install tmuxinator
#zshの場合。bashの人は.bashrcに追記
$ echo "[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator" >> .zshrc
$ source .zshrc
#~/.tmuxinator配下に設定ファイルが作成される
$ mux new uitalk

設定方法

# default.ymlを作成しておくと、共通の設定として読み込まれる
$ vi ~/.tmuxinator/uitalk.yml
##################################################
# prject_name:プロジェクト名
# project_rootプロジェクトのパス
# socket_name:ソケット名
# rvm:利用するrubyのバージョン
# pre:tmuxinator起動時に実行するコマンド
# tabs:各タブの起動設定
#   -[ウインドウ名]:[ウィンドウ起動時に実行するコマンド]
##################################################
project_name: uitalk
project_root: ~/project/rails/UITalk
socket_name: foo # Not needed.  Remove to use default socket
#rvm: 1.9.3@rails_project
#pre: sudo /etc/rc.d/mysqld start
tabs:
  - main:
      layout: tiled
      panes:
        - git fetch --prune && git status --short --branch
        - tig
  - vim: vi
  - server: script/s
  - logs:
      layout: tiled
      panes:
        - tail -f log/development.log                                                                                                                                         
        - tail -f log/test.log

起動方法

$ mux uitalk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment