tmux 個人的チートシート
config
https://github.com/snaka/my-dotfiles/blob/master/.tmux.conf
prefixキー: ctrl + a
ペイン
現在の pane を window として切り離す: {prefix} → !
別のwindowを現在のwindowのpaneにする: join-pane -s {source_window}
-h 水平(左右)
-v 垂直(上下)
ウィンドウ
ウィンドウ作成: {prefix} → c
クライアント
クライアント一覧: {prefix} → s
前のクライアントに切り替え: {prefix} → (
次のクライアントに切り替え: {prefix} → )
その他
コピーモード: {prefix}, [
コピーモードでの操作
検索: /
セッションのカレントディレクトリ変更
code:prefix + ':' でコマンドモードに入り、以下を実行
attach-session -c /path/to/new/directory
VSCode の設定
code:settings.json 抜粋 (json)
"terminal.integrated.defaultProfile.osx": "tmux",
{
"terminal.integrated.profiles.osx": {
"tmux": {
"path": "tmux",
"args": "new-session", "-A", "-s", "vscode:${workspaceFolder}",
"icon": "terminal-tmux"
},
// ...
}
}
参考
とほほのtmux入門 - とほほのWWW入門
Visual Studio Code の統合ターミナルで tmux を利用する
Variables reference