-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf.symlink
88 lines (68 loc) · 2.41 KB
/
tmux.conf.symlink
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
set -g default-command "login-shell"
#
# automatically renumber tmux windows
set -g renumber-windows on
set -g default-terminal "tmux-256color"
# set -as terminal-overrides ",xterm*:Tc:sitm=\E[3m"
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
# set -ga terminal-overrides ",xterm-256color:Tc"
# unbind default prefix and set it to ctrl+space
unbind C-b
set -g prefix C-space
bind C-space send-prefix
# make delay shorter
set -sg escape-time 0
# make window/pane start with 1
set -g base-index 1
setw -g pane-base-index 1
set-option -g set-titles on
set-option -g set-titles-string "#W"
# activity monitoring
setw -g monitor-activity off
set -g visual-activity off
# rather than constraining window size to the max size of any client connected
# to the *session*, contrain window size to the max size of any client
# connected to *that window*.
setw -g aggressive-resize on
# =========================================================
# key bindings
# =========================================================
# reload config file
bind r source-file ~/.tmux.conf \; display "config reloaded!"
# split window and fix path for tmux 1.9
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# pane movement shortcuts
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# synchronize all panes in a window
bind y setw synchronize-panes
# resize pane shortcuts
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
bind e set-window-option synchronize-panes
# enable mouse support for switching panes/windows
setw -g mouse on
# swap windows
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# set vi mode for copy mode
setw -g mode-keys vi
# more settings to make copy-mode more vim-like
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -Tcopy-mode-vi 'v' send -X begin-selection
bind -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# buffers to/from mac clipboard (pragprog)
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer"
# =========================================================
# appearance settings
# =========================================================
source ~/.dotfiles/tmux/base16.sh