-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmux.conf
102 lines (77 loc) · 2.83 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
# ==== Key Bindings ====
# set global prefix to Ctrl+Space
unbind C-b
set -g prefix C-Space
# enable easy reloading of .tmux.conf
bind r source-file ~/.tmux.conf \; display "Reloaded .tmux.conf!"
# easy window splitting
# future proofing these keys
unbind v
unbind h
# undo current split keys
unbind % # vert split
unbind '"' # horiz split
# set easier split keys
# remember: split type is direction of the cut, not stack
bind s split-window -h -c "#{pane_current_path}"
bind v split-window -v -c "#{pane_current_path}"
# easier pane navigation with nvim awareness
# bind -n C-H select-pane -L
# bind -n C-J select-pane -D
# bind -n C-K select-pane -U
# bind -n C-L select-pane -R
# is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
# bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
# bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
# bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
# bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# easier window management
unbind n # was: move to next window
unbind w # was: change current window interactively
bind n command-prompt "rename-window '%%'"
bind w new-window -c "#{pane_current_path}"
# use Alt+j/k to move to prev/next windows
bind j previous-window
bind k next-window
# set up copy mode to be vim style
unbind -T copy-mode-vi Space; # default begin-selection
unbind -T copy-mode-vi Enter; # default copy-selection
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel --clipboard"
# ==== Settings ====
# fix vim mode switch delay
set -s escape-time 0
# enable mouse
# set -g mouse on
# set window base to 1
set -g base-index 1
# ensure default terminal is 256color friendly
set -g default-terminal "tmux-256color"
# increase scrollback buffer size
set -g history-limit 50000
# display tmux messages for 10 seconds
set -g display-time 10000
# refresh status-left and status-right more often
set -g status-interval 5
# easy next/prev window switching
# bind C-p previous-window
# bind C-n next-window
# "adaptable" key bindings that build upon your prefix value
# bind C-Space send-prefix
# bind Space last-window
set-window-option -g pane-base-index 1
set-window-option -g mode-keys vi
set-option -g status "on"
# load default TMUX color scheme
if-shell "test -f /home/efex/.tmux/lightline_visual" "source /home/efex/.tmux/lightline_visual"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
# Initialize TMUX plugin manager
run -b '/home/efex/.tmux/plugins/tpm/tpm'