-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
70 lines (53 loc) · 1.74 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
set -g default-terminal "xterm-256color"
set -g terminal-overrides ",xterm-256color:Tc"
# set windows and panes to start from index 1
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# reload tmux with prefix r
unbind r
bind r source-file ~/.tmux.conf
# fix escape latency in neovim and others
set -sg escape-time 0
# prefix
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
# window management
unbind %
bind \\ split-window -h -c "#{pane_current_path}"
unbind '"'
bind / split-window -v -c "#{pane_current_path}"
#
# unbind c
# bind c new-session -c "#{pane_current_path}"
#
# resize tmux
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
bind -r m resize-pane -Z
set -g mouse on
# vim like key bindings
set-window-option -g mode-keys vi
# keybindings for copying
bind-key -T copy-mode-vi v send-keys -X begin-selection
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-cancle
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer "$(xclip -o -sel clipboard)"; tmux paste-buffer"
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging with mouse
# tpm plugin
set -g @plugin 'tmux-plugins/tpm'
# list of tmux plugins
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'dracula/tmux'
set -g @plugin 'tmux-plugins/tmux-yank'
# dracula theme config for components
set -g @dracula-show-powerline true
set -g @dracula-show-left-icon session
set -g @dracula-plugins "cpu-usage ram-usage"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'