はじめましてtmux
macを買ってから、rubyやるってことで、開発の中心がコンソールになるだろうってことで、
tmux入門しました。
# install # execute following command $ brew search tmux $ brew install tmux $ which tmux /usr/local/bin/tmux # start tmux $ tmux
ということでtmuxはじめましてが出来ましたとさ。
んで、デフォルトだとプレフィックスキー(コマンドを実行する前に打つキー)がCtrl+Bで左手で打つにはちょっと遠いので、
キーバインドを編集します。
内容はManpageに倣って、こんな感じ。
cat .tmux.conf # bind prefix key to C-t set-option -g prefix C-t unbind-key C-b bind-key C-a send-prefix
これでCtrl+T→%とかって押すと画面分割できたりします。
あとは随時更新していきます、たぶんw
追記
最終的にはこんな感じ。
上記の状態だと、スクロールした場合にその画面に表示されていたものより前のものは切れてしまって表示できなかった。
しかし、これでしっかりスクロールできるようになりました。
ちなみにコピーするときはOptionを押しながら選択してCommand+cを押さなければならない。
$ cat .tmux.conf # bind prefix key to C-t set-option -g prefix C-t unbind-key C-b bind-key C-a send-prefix # status line #set -g status-right '#[bg=yellow,bold] #(echo $LANG) #[bg=blue] up #(pc-running-time) #[bg=green] (#(loadaverage)) Mem #(used-mem)%% #[bg=red,bold] %y/%m/%d(%a)%H:%M:%S ' set-window-option -g mode-mouse on set -g terminal-overrides 'xterm*:smcup@:rmcup@' #set-option -g history-limit 2048