draemonash2のメモ書き
tmux
tmux new -s <session_name>
Ctrl-b d
# Detachtmux a
# Attachtmux a -t <session_name>
tmux list-sessions
Ctrl-b s
tmux kill-session
tmux kill-server
tmux kill-session -t <session_name>
exit
【セッション削除】 Ctrl-d
【接続クライアント確認】 tmux list-client
# 接続中のクライアント(=ターミナル)一覧を表示する
Ctrl-b c
# CreateCtrl-b n
# NextCtrl-b p
# PrevCtrl-b l
# LastCtrl-b 数字
Ctrl-b '
Ctrl-b w
# WindowCtrl-b ,
Ctrl-b .
exit
Ctrl-d
【ウィンドウ削除 (確認付き)】 Ctrl-b &
Ctrl-b "
Ctrl-b %
Ctrl-b 矢印
Ctrl-b o
Ctrl-b ;
Ctrl-b q
Ctrl-b {
/ Ctrl-b }
Ctrl-b z
Ctrl-b SPACE
Ctrl-b t
Ctrl-b !
exit
Ctrl-d
【ペイン削除(確認付き)】 Ctrl-b x
Ctrl-b [
q
Ctrl-b ]
h
/j
/k
/l
Ctrl-u
/ Ctrl-d
Ctrl-b
/ Ctrl-f
SPACE
ENTER
【コピーモード 矩形モード切替え】 v
Ctrl-b ?
【コマンド入力モード】 Ctrl-b :
tmux show-options -s
tmux show-options -g
tmux show-options
tmux show-options -wg
tmux show-window-options -g
【オプション表示(現在ウィンドウ)】 tmux show-window-options
tmux set-window-option synchronize-panes on
tmux set-window-option synchronize-panes off
xpanes -e "top" "vmstat 1" "watch -n 1 free"
.tmux.conf
上で、以下のように条件分岐させて同じキーで別の処理を割り当てる
(uname | grep -q Linux && test "${MYTERM_PRG}" == "TeraTerm"); echo $?
(uname | grep -q Linux && test "${MYTERM_PRG}" == ""); echo $?
(uname | grep -q Darwin && test "${MYTERM_PRG}" == "TeraTerm"); echo $?
(uname | grep -q Darwin && test "${MYTERM_PRG}" == ""); echo $?
./.local/share/tmux/resurrect/last
~
が送信されている。F2は2~
、F3は3~
。vimの~
は大文字小文字入れ替え。ctrl+b
をctrl+,
に置き換えているためBSpace
へ割り当てる
bind Bspace select-pane -L
<bs>
へ割り当てる
noremap <bs> 10zh10h