introducing to tmuxinator
Bài đăng này đã không được cập nhật trong 8 năm
tmuxinator
what is the point to do this?
You will never need to
- remember what command you need to run the server for your application
- open new tab in terminal and type gulp watch ~ redis-server ~ or something
All you need to do is mux (app name)
after you are set to use tmuxinator.
Installation
gem install tmuxinator
Editor and Shell
tmuxinator uses your shell's default editor for opening files. If you're not sure what that is type:
echo $EDITOR
For me that produces "vim". If you want to change your default editor simply put a line in ~/.bashrc that changes it. Mine looks like this:
export EDITOR='vim'
tmux
The recommended version of tmux to use is 1.8.
what I did
at root directory in your pc
mkdir .tmuxinator
cd .tmuxinator
Download the appropriate completion file from completion file
bash
Add the following to your ~/.bashrc
:
source ~/.tmuxinator/tmuxinator.bash
zsh
Add the following to your ~/.zshrc
:
source ~/.tmuxinator/tmuxinator.zsh
and read the instruction here
for example one of my setting is below
1 # ~/.tmuxinator/conf.yml
2
3 name: conf
4 root: ~/framgia/confRoom
5
6 # Runs after everything. Use it to attach to tmux with custom options etc.
7 # post: tmux -CC attach -t conf
8
9 # pre:
10 # -
11
12 windows:
13 - main: cd ~/framgia/confRoom
14 - editor: vim
15 - server: rails s -b 0.0.0.0
16 - postgres: postgres -D /usr/local/var/postgres
17 - psql: psql development
All rights reserved