-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
125 lines (88 loc) · 3.35 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
# vim: set ft=sh:
################################ Settings #################################
# Remap prefix to Control-a
set -g prefix C-a
# Start numbering at 1
set -g base-index 1
set -g pane-base-index 1
# Faster key repetition
set -s escape-time 0
# Longer timeout for displaying panes numbers (prefix Q)
set -g display-panes-time 3000
# More scrollback history (Default: 2000)
set -g history-limit 3000
# Use vim keys on visual mode
set -g mode-keys vi
# Use emacs keys on status line mode
set -g status-keys emacs
set -g mouse on
################################# Binds ###################################
# Use C-a to send the prefix key to current window
unbind C-b
bind C-a send-prefix
# Easily traverse panels
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Use same config as in my .vimrc for switching windows
bind i previous-window
bind o next-window
# Use `v' and `s' for splitting windows into panes
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
# Vim-like copy/paste in copy-mode
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection
# Create new named window
bind C command-prompt -p "Name of new window:" "new-window -n '%%'"
bind c new-window
# Fuzzy find window in current session
# Requires `ftwind` command and `fzf` installed
# github.com/pokey/dotfiles/blob/dade6c88af31458c323e8f0247af510bca7af0f5/bin/ftwind
bind f run -b ftwind
# Jump to last visited window
bind \\ last-window
# Reload config file
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# Move windows left and right
bind -n C-S-Left swap-window -d -t -1
bind -n C-S-Right swap-window -d -t +1
# Toggle vertical zoom
bind a if -F '#{@layout_save}' \
{run 'tmux select-layout "#{@layout_save}" \; set -up @layout_save'} \
{set -Fp @layout_save "#{window_layout}"; run 'tmux resizep -y "#{window_height}"'}
################################ Colors ###################################
# Set color terminal mode
set -g default-terminal "screen-256color"
set -g terminal-overrides ",xterm-256color:Tc"
# Statusline
set -g status-left ''
set -g status-right ''
set -g status-justify centre
# Messages color in statusbar
set-option -g message-style fg=brightwhite,bg=black
# Statusbar colors
set -g status-fg white
set -g status-bg color236
set -g status-style default
# Window title colors
set-window-option -g window-status-style fg=white,bg=default,dim
# Active window title colors
set-window-option -g window-status-current-style fg=white,bg=default,bright
# Activity window title colors
set-window-option -g window-status-activity-style fg=red,bg=default,bright
################################ Plugins ##################################
# To install tpm clone, reload and then hit <prefix>+I
# git clone /~https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'lukka5/tmux-resurrect-virtualenvwrapper'
# tmux-open
set -g @open-S 'https://www.google.com/search?q='
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'