forked from davidbrewer/tmux-conf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
145 lines (112 loc) · 3.88 KB
/
Copy pathtmux.conf
File metadata and controls
145 lines (112 loc) · 3.88 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# unbind some default keybindings
unbind C-b
bind C-c new-window -c "#{pane_current_path}"
# set prefix key to ctrl-a
set -g prefix C-a
# lower command delay
set -sg escape-time 1
# start first window and pane at 1, not zero
set -g base-index 1
set -g pane-base-index 1
# bind r to reloading the config file
bind r source-file ~/.tmux.conf \; display "Reloaded tmux config file."
# pass through a ctrl-a if you press it twice
bind C-a send-prefix
# better mnemonics for splitting panes!
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# vim / xmonad style bindings for pane movement
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# arrow bindings for pane movement
bind -r Left select-pane -L
bind -r Down select-pane -D
bind -r Up select-pane -U
bind -r Right select-pane -R
# vim / xmonad style bindings for window movement
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# arrow bindings for window movement
bind -r C-Left select-window -t :-
bind -r C-Right select-window -t :+
# shift-movement keys will resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# shift arrow keys will resize panes
bind -r S-Left resize-pane -L 5
bind -r S-Down resize-pane -D 5
bind -r S-Up resize-pane -U 5
bind -r S-Right resize-pane -R 5
# disable mouse support (at least while we're learning)
#setw -g mode-mouse off
#set -g mouse-select-pane off
#set -g mouse-resize-pane off
#set -g mouse-select-window off
# turn on 256 color support in tmux
set -g default-terminal "screen-256color"
# fiddle with colors of status bar
set -g status-fg white
set -g status-bg colour234
# fiddle with colors of inactive windows
setw -g window-status-fg cyan
setw -g window-status-bg colour234
setw -g window-status-attr dim
# change color of active window
setw -g window-status-current-fg white
setw -g window-status-current-bg colour88
setw -g window-status-current-attr bright
# set color of regular and active panes
set -g pane-border-fg colour238
set -g pane-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-bg default
# set color of command line
set -g message-fg white
set -g message-bg colour22
set -g message-attr bright
# configure contents of status bar
set -g status-left-length 40
set -g status-left "#[fg=green]\"#S\""
set -g status-right "#[fg=green] #h | %d %b %R"
set -g status-justify centre
setw -g monitor-activity on
set -g visual-activity on
# navigate using vim-style keys
setw -g mode-keys vi
# copy/paste using vim-style keys
bind Escape copy-mode
unbind p
bind p paste-buffer
# bind -t vi-copy 'v' begin-selection
# bind -t vi-copy 'y' copy-selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
# xclip support (commented as this often doesn't make sense on remote servers)
#bind C-c run "tmux save-buffer - / xclip -i -sel clipboard"
#bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# set up alias for turning on logging
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
# increase length of history buffer
set-option -g history-limit 9999
# unbind arrow keys. This prevents cases where you switch
# to a different pane, then use the arrow key to go through
# command history, and accidentally switch back to the previous
# pane
#unbind Up
#unbind Down
#unbind Left
#unbind Right
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'