/
.tmux.conf
36 lines (27 loc) · 1.05 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# tmux起動時のシェルをzshにする
set-option -g default-shell /bin/zsh
# tmuxを256色表示できるようにする
set-option -g default-terminal screen-256color
set -g terminal-overrides 'xterm:colors=256'
# prefixキーをCtrl-aに変更
set -g prefix C-a
# Ctrl-bのキーバインドを解除
unbind C-b
## prefix + -で水平分割
bind - split-window -v
## ペインの移動をprefixなしで行う(Shift + 矢印キー)
bind -n S-left select-pane -L
bind -n S-down select-pane -D
bind -n S-up select-pane -U
bind -n S-right select-pane -R
# ペイン同期
bind S set-window-option synchronize-panes on
bind s set-window-option synchronize-panes off
# vi mode
set-window-option -g mode-keys vi
# 'v' で選択を始める
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# `Enter` でもcopy-pipeを使う
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"