-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
91 lines (73 loc) · 2.71 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
## ============================================================================
## Tmux Configuration File
## ============================================================================
# Mario Longobardi
## ============================================================================
## Key Bindings
## ============================================================================
# Remap window navigation to vim
unbind-key j
bind-key j select-pane -D
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R
# Set a Ctrl-b shortcut for reloading your tmux config
bind r source-file ~/.tmux.conf
# Resizing
bind-key s resize-pane -x 98
bind-key S resize-pane -y 12
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?|emacsclient)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Re-Bind clear screen
bind C-l send-keys 'C-l'
## ============================================================================
## Settings
## ============================================================================
# Set colors
#set-option -g default-terminal "screen-256color"
# Use vim bindings
setw -g mode-keys vi
set -g status-keys vi
# toggle mouse mode to allow mouse copy/paste
# set mouse on with prefix m
bind m \
set -g mouse on \;\
display 'Mouse: ON'
# set mouse off with prefix M
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
source-file ~/.tmux/prompt.sh
#setw -g utf8 on
#setw -g status-utf8 on
#set-window-option -g utf8 on
# bind key for synchronizing panes
bind-key C-s set-window-option synchronize-panes
set-window-option -g xterm-keys on
# Allow local customization in ~/.tmux_local.conf
if-shell "[ -f ~/.tmux_local.conf ]" 'source ~/.tmux_local.conf'
# List of plugins
# Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-copycat \
tmux-plugins/tmux-open \
tmux-plugins/tmux-yank \
#tmux-plugins/tmux-sensible \
'
set -g @yank_selection 'primary'
# Other examples:
# github_username/plugin_name \
# [email protected]/user/plugin \
# [email protected]/user/plugin \
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'