-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
76 lines (60 loc) · 2.33 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
# Mouse support - set to on if you want to use the mouse
set -g mouse on
# Increase buffer size
set-option -g history-limit 10000
# Disable xterm style clipboard
set-option -s set-clipboard off
# remap prefix to Control + a
set -g prefix C-a
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b
# Enable vi on copy-mode
set -g mode-keys vi
# vi style copy/paste
bind p paste-buffer
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 \
\; send-keys -X begin-selection
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'pbcopy'
bind-key -T copy-mode-vi \
MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'pbcopy'
# Enable focus-events, needed by nvim |'autoread'|
set-option -g focus-events on
# Set the default terminal mode to 256color mode
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",tmux-256color:Tc"
# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
# Center the window list
set -g status-justify centre
# set escape-timeout (neovim workaround)
set -g escape-time 10
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config
bind r source-file ~/.tmux.conf
##############
# Extracto #
##############
set -g @extrakto_filter_order "word quote s-quote path line all"
source-file ~/.powerline.conf
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# List of plugins
set -g @plugin 'laktak/extrakto' # Autocomplete text that is already on the screen
set -g @plugin 'schasse/tmux-jump' # Jump wherever you want in your terminal
set -g @plugin 'tmux-plugins/tmux-urlview' # Quickly open any url on your terminal window
set -g @plugin 'sainnhe/tmux-fzf'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'