-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmux.conf
94 lines (71 loc) · 2.7 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
# tmux v3.x compatible; some macOS specific.
set-option -g default-shell "/usr/local/bin/fish"
set-option -g default-command "fish -l"
set -g default-terminal xterm-256color
# Automatic window renaming may use a lot of CPU
setw -g automatic-rename off
set -s set-clipboard external
set -as terminal-features ',rxvt-unicode-256color:clipboard'
# Use backtick as the prefix
# Do it just like this or you will not
# be able to use type backtick literally
unbind C-b
set -g prefix `
bind ` send-prefix
bind-key L last-window
# Allows us to use '<prefix>-a' <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Start numbering at 1
set -g base-index 1
# Make mouse useful in copy mode
# Note: when an application turns on the mouse, most terminals
# provide a way to bypass it. On many Linux terminals this is
# holding down the Shift key; for iTerm2 it is the option key.
set -g mouse on #For tmux version 2.1 and up
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Yank and copy/paste for macOS
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' # tmux kill-server && tmux
# Scroll History
set -g history-limit 30000
# Allows for faster key repetition
set -s escape-time 0
# 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
# Highlight active window
# set-window-option -g window-status-current-bg red
# Set 'v' for vertical and 'h' for horizontal split
bind v split-window -h -c '#{pane_current_path}'
bind b split-window -v -c '#{pane_current_path}'
# vim-like pane switching
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# vim-like pane resizing
bind -r C-k resize-pane -U
bind -r C-j resize-pane -D
bind -r C-h resize-pane -L
bind -r C-l resize-pane -R
bind-key M-7 resize-pane -t 1 -x 90
bind-key M-8 resize-pane -t 1 -x 60
bind-key M-9 resize-pane -t 1 -x 30
bind-key M-0 resize-pane -t 0 -x 30
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Some consoles don't like attempts to set the window title
set -g set-titles off
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# statusbar configuration
set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/double/magenta'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# source the config: tmux source-file ~/.tmux.conf