-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
117 lines (88 loc) · 2.54 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
## Preferences
# start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
# renumber all windows when any window is closed
set -g renumber-windows on
# use vi mode
setw -g mode-keys vi
# allows for faster key repetition
set -sg escape-time 0
# history
set -g history-limit 1000000
# dont exit from tmux when closing a session
set -g detach-on-destroy off
# display messages for 4 seconds
set -g display-time 4000
## Appearance
set-option -g default-terminal 'screen-254color'
set-option -g terminal-overrides ',xterm-256color:RGB'
set -g default-terminal "${TERM}"
# command / message line
set -g message-style fg=green,bg=black
# window-status-current
setw -g window-status-current-style bg=black,fg=green
# status bar
set -g status-bg black
set -g status-fg cyan
set -g status-left '#[fg=cyan]#S '
set -g status-right '#[fg=yellow]%d/%m/%y %H:%M:%S#[default]'
set -g status-right ''
## Keybindings
# prefix
unbind C-b
set -g prefix C-a
bind-key C-a send-prefix
# last active window
bind-key a last-window
# switch windows using Alt+
bind-key -n M-j previous-window
bind-key -n M-k next-window
# pane resizing
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# copy/paste from/to buffers using vi-like keys
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi [ send-keys -X scroll-up
bind-key -T copy-mode-vi ] send-keys -X scroll-down
bind-key -T copy-mode-vi C-[ send-keys -X page-up
bind-key -T copy-mode-vi C-] send-keys -X page-down
# pane splitting
bind | split-window -h -c "#{pane_current_path}"
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# new window
unbind c
bind c new-window -c "#{pane_current_path}"
# turn mouse on
bind m \
set mouse on \;\
display 'Mouse: ON'
# turn mouse off
bind M \
set mouse off \;\
display 'Mouse: OFF'
# force a reload of the config file
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'tmux reloaded'
# set environment variables
run '~/.dotfiles/tmux/setenv.tmux'
## Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'Morantron/tmux-fingers'
set -g @fingers-key space
set -g @fingers-jump-key P
# initialize tmux plugin manager
run '~/.tmux/plugins/tpm/tpm'