-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
83 lines (61 loc) · 2.44 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
# Captures the mouse and allows mouse events to be bound as key bindings
set -g mouse on
# Specify the default shell
set -g default-shell /bin/bash
# Increase scrollback buffer size; default is 2000
set -g history-limit 10000
# Refresh 'status-left' and 'status-right' more often; default is 15
set -g status-interval 5
# Status bar
set -g status-right '#(date "+%H:%M %d-%b-%y")'
set -g status-left-length 20
# Window colors
# set -g window-status-current-style bg=cyan
set -g status-style bg='#0087d7',fg='#000000'
set -g window-status-current-style bg='#42a4b8'
# Pane colors
set -g pane-border-style fg='#0087d7'
set -g pane-active-border-style bg=default,fg='#42a4b8'
# Prefix + :
set -g message-style bg='#42a4b8',fg='#000000'
# Prefix + w
set -g mode-style bg='#42a4b8',fg='#000000'
# e.g. start selection in copy-mode with <space>; automatically set to "vi" if $VISUAL or $EDITOR contains "vi"
setw -g mode-keys vi
set -g status-keys vi
# Address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# tmux messages are displayed for 1.5 seconds
set -g display-time 1500
# Change the default $TERM to tmux-256color
# set -g default-terminal "screen-256color"
set -g default-terminal "tmux-256color"
# The CTRL-b binding isn’t horribly intuitive especially if you’re used to screen. Rebind to CTRL-a
unbind-key C-b
set -g prefix C-a
bind-key C-a send-prefix
# Split window
bind-key < split-window -h -c "#{pane_current_path}" # -c -> copy path from existing pane to new pane
bind-key - split-window -v -c "#{pane_current_path}" # -c -> copy path from existing pane to new pane
# Default: Right click in pane --> mark pane (same as CTRL-a-m)
# Bind right click to default left click
bind-key -T root MouseDown3Pane select-pane -t = \; send-keys -M
# Exit copy-mode with left click
bind-key -T copy-mode-vi MouseUp1Pane send-keys -X cancel
# Syncronize panes
bind-key s set-window-option synchronize-panes\; display-message 'synchronize-panes #{?synchronize-panes,on,off}'
# Monitor window
# bind-key m set monitor-activity\; display-message 'monitor-activity #{?monitor-activity,on,off}'
# Toggle mouse feature
bind-key m set mouse\; display-message 'mouse #{?mouse,on,off}'
# Show/Hide status bar
bind-key b set-option status
# unbind [
# 1. Enter copy mode
bind-key Escape copy-mode
# 2. Space key to start selection
# 3. Paste
bind-key p paste-buffer
# Debug
# List current bindings: tmux list-keys
# Show options: tmux show -gw