-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
104 lines (81 loc) · 2.62 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
set -g repeat-time 100
set-option -g prefix C-a
set -s escape-time 1
set -g base-index 1
set -g pane-base-index 1
set-option -g history-limit 100000
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# mouse stuff
set -g mouse on
# set -g mouse-resize-pane on
# set -g mouse-select-pane off
# set -g mouse-select-window off
bind -r a next-window
bind -r Right next-window
bind -r A previous-window
bind -r Left previous-window
# status
set -g status off
unbind %
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# VIM setting
set-option -g word-separators " -_@|/:"
# splitting
bind | split-window -c "#{pane_current_path}" -h
bind v split-window -c "#{pane_current_path}" -h
bind - split-window -c "#{pane_current_path}" -v
bind s split-window -c "#{pane_current_path}" -v
bind-key l choose-session
bind-key n new-session
bind-key c new-session
# resizing
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
setw -g mode-keys vi
set-option -g status-keys vi
# used for tmux < 2.4
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'V' begin-selection
# bind-key -t vi-copy 'y' copy-pipe "pbcopy" # for OSX
# bind-key -t vi-copy 'y' copy-pipe "xsel -i -b"
# for tmux >= 2.4
# see https://shapeshed.com/custom-vim-bindings-in-tmux-2-4/
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "xsel -b -i"
bind p paste-buffer
bind Escape copy-mode
bind C-v run "tmux set-buffer -- \"$(xsel -b -o)\"; tmux paste-buffer"
# bind C-v run "tmux set-buffer -- \"$(pbpaste)\"; tmux paste-buffer" # for OSX
set -g default-terminal "xterm-256color"
set -g status-fg black
set -g status-bg white
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr dim
set -g pane-border-fg default
set -g pane-border-bg black
set -g pane-active-border-fg green
set -g pane-active-border-bg default
set -g message-fg white
set -g message-bg black
set -g message-attr bright
setw -g monitor-activity on
set -g visual-activity on
# send double C-a to e.g. shell
bind C-a send-prefix
# set-option -g default-shell /bin/bash
# zooming in and out
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp