-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
75 lines (58 loc) · 2.37 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
# Change prefix from Ctrl-b to Ctrl-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# set shell
set -g default-shell /bin/zsh
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color*:Tc"
#set -g default-terminal "xterm"
set -g status-style 'bg=#333333 fg=#5eacd3'
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
set -g base-index 1
# Copy mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
# for linux with xclip
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# for macos
#bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# shortcut to synchronize-panes (send command to all panes)
unbind y
bind y set-window-option synchronize-panes
# v and h are not binded by default, but we never know in the next versions...
unbind v
unbind h
unbind % # Split vertically
unbind '"' # Split horizontally
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"
# keybinding to maximize/minimize pane
bind -r m resize-pane -Z
# Enable use of mouse
set -g mouse on
# Do not copy selection and cancel copy mode on drag end event
# Prefer iTerm style selection: select, then mouse click to copy to buffer
unbind -T copy-mode-vi MouseDragEnd1Pane
# MacOS
# bind -T copy-mode-vi MouseDown1Pane select-pane \;\
# send-keys -X copy-pipe "pbcopy" \;\
# send-keys -X clear-selection2
# increase scrolling history
set -g history-limit 100000
# VIM - integration
# Cursos nvim
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
# tpm plugin
set -g @plugin 'tmux-plugins/tpm'
# list of tmux plugins
set -g @plugin 'jimeh/tmux-themepack' # to configure tmux theme
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes
set -g @themepack 'powerline/default/cyan' # use this theme for tmux
set -g @resurrect-capture-pane-contents 'on' # allow tmux-ressurect to capture pane contents
set -g @continuum-restore 'on' # enable tmux-continuum functionality
set -g @plugin 'christoomey/vim-tmux-navigator' # Navigation between panes and nvim.
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'