-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
168 lines (131 loc) · 4.55 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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# ~/.tmux.conf
# reload with:
# tmux source-file ~/.tmux.conf
# ...or (in tmux)
# <prefix> r
# ...or (in tmux)
# <prefix> : source-file ~/.tmux.conf
# C-b is not acceptable, vim uses it
# I like C-x cause I use C-a to go to start of line
set-option -g prefix C-x
# C-x C-x swaps between two windows
bind-key C-x last-window
# Support for 256 colors
set-option -g default-terminal "screen-256color"
# large history
set-option -g history-limit 100000
# move status bar to the top
set-option -g status-position top
# highlight status bar on activity
set-window-option -g monitor-activity on
set-option -g visual-activity on
set-option -g visual-bell on
# automatically set window title
set-option -g automatic-rename on
# force a reload of the config file
bind r source-file ~/.tmux.conf
# start numbering at 1 (for easier finger-reachin')
set -g base-index 1
# allows for faster key repetition
set -s escape-time 0
# set status bar
set -g status-left ""
set -g status-right "#[fg=blue]#H"
# use 12-hour clock
setw -g clock-mode-style 12
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# use C-x [ to navigate the buffer with vi hotkeys (enter to exit)
setw -g mode-keys vi
# Allows us to use C-x a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# easier-to-remember window splits
bind | split-window -h
bind - split-window -v
# split 75% top and 25% bottom
bind-key % split-window -p 25
# moving between panes with vim movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Highlight active window
set-window-option -g window-status-current-bg red
# allow pasting into macvim
# c.p. http://stackoverflow.com/a/16661806
if-shell 'test "$(uname -s)" = Darwin' 'set-option -g default-command "exec reattach-to-user-namespace -l bash"'
# enable mouse controls
# this works nicely, but interferes with iTerm2's helpful select-to-copy
#set -g mode-mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on
#set mouse-utf8 off
# enable ssh-agent in new windows
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
# bind e setw synchronize-panes on
# bind E setw synchronize-panes off
# Example of using a shell command in the status line
#set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)"
# bind vi key-mapping
#set-option -g status-keys vi
# vi-style controls for copy mode
#set-window-option -g mode-keys vi
# start solarized light color scheme
# default statusbar colors
#set-option -g status-bg white #base2
#set-option -g status-fg yellow #yellow
#set-option -g status-attr default
#
## default window title colors
#set-window-option -g window-status-fg brightyellow #base00
#set-window-option -g window-status-bg default
##set-window-option -g window-status-attr dim
#
## active window title colors
#set-window-option -g window-status-current-fg brightred #orange
#set-window-option -g window-status-current-bg default
##set-window-option -g window-status-current-attr bright
#
## pane border
#set-option -g pane-border-fg white #base2
#set-option -g pane-active-border-fg brightcyan #base1
#
## message text
#set-option -g message-bg white #base2
#set-option -g message-fg brightred #orange
#
## pane number display
#set-option -g display-panes-active-colour blue #blue
#set-option -g display-panes-colour brightred #orange
#
## clock
#set-window-option -g clock-mode-colour green #green
# end solarized color
# start railscasts color scheme
# sttus bar
set -g status-bg colour235
set -g status-fg white
set-window-option -g window-status-current-fg black
set-window-option -g window-status-current-bg green
#set -g pane-border-fg colour235
set -g pane-border-fg white
set -g pane-border-bg black
set -g pane-active-border-fg green
set -g pane-active-border-bg black
# end railscasts color
# Enable mouse support in ~/.tmux.conf
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
# Pretend our terminal doesn't support alternative screens, and thus all text
# should be placed into the scrollback buffer when it goes off the top of the
# screen.
#
# http://superuser.com/questions/310251/use-terminal-scrollbar-with-tmux
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'