-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
90 lines (70 loc) · 2.53 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
# Use Ctrl-A to avoid Vim scrolling conflict, etc.
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# set -g default-terminal "screen-256color"
set -g default-terminal "tmux-256color"
set-option -sa terminal-overrides ',xterm-256color-italic:RGB,xterm*:sitm=\E[3m'
set-option -g default-shell /bin/zsh
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# Vim finger compatibility.
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
# 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 -r k select-pane -U
# bind -r j select-pane -D
# bind -r h select-pane -L
# bind -r l select-pane -R
# Try switching Ctrl and normal HJKL
bind -r k resize-pane -U
bind -r j resize-pane -D
bind -r h resize-pane -L
bind -r l resize-pane -R
bind -r C-k select-pane -U
bind -r C-j select-pane -D
bind -r C-h select-pane -L
bind -r C-l select-pane -R
# and now unbind keys
unbind Up
unbind Down
unbind Left
unbind Right
unbind C-Up
unbind C-Down
unbind C-Left
unbind C-Right
# Don't try to use the prefix repeat capability
set-option -g repeat-time 0
# Follow directory when creating new windows or panes
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
bind c new-window -c '#{pane_current_path}' # Create new window
# Make mouse useful in copy mode
set-option -g mouse on
# Reduce escape delay
set -sg escape-time 5
# Pick up the nice status line
source-file ~/.dotfiles/tmuxline.conf
# List of plugins
# set -g @plugin 'tmux-plugins/tpm'
# https://github.com/tmux-plugins/tmux-sensible
# set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# tmux-mem-cpu-load config
# set -g status-interval 2
# set -g status-left "#S #[fg=green,bg=black]#(tmux-mem-cpu-load --powerline-left --averages-count 1 --interval 2)#[default]"
# set -g status-left-length 60
set -g @resurrect-strategy-vim 'session'
# Pane borders.
set -g pane-border-status top
set -g pane-border-format " [#{pane_index}] #{?@custom_pane_title,#{@custom_pane_title},}#{pane_title} | #{pane_current_command} "
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# run '~/.tmux/plugins/tpm/tpm'
# Whatever this is it makes nvim faster...?
set -g focus-events off
# set-option -g focus-events on