forked from eyesmd/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
88 lines (83 loc) · 2.96 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
# [PLUGINS]
set -g @plugin 'tmux-plugins/tpm' # plugin manager
set -g @plugin 'tmux-plugins/tmux-sensible' # basic options
set -g @plugin 'jimeh/tmux-themepack' # color themepack
set -g @themepack 'powerline/double/green' # green is cool
set -g @plugin 'tmux-plugins/tmux-yank' # copy-paste
set -g @plugin 'tmux-plugins/tmux-resurrect' # persistant sessions
# [NOTES]
# Config
# - Many have aliases, such as set-option and set
# - Set and setw have different sets of properties
# - C-D exits panes/windows/sessions (actually exits current shell)
# Shortcuts
# ':': command-mode
# s: list-sessions (able to switch sessions)
# d: detach-client
# k: kill-session (custom bind)
# c: new-window
# p/n: previous-window/next-window
# h/v: split-window (custom bind)
# Arrows: resize-pane (custom bind)
# (-n) Alt: resize-pane (custom bind)
# z: zoom
# r: resource config (custom bind)
# m: copy mode (custom bind)
#
# Commands
# new [-s nm]: new-session
# a [-t nm]: attach-session
# rename nm: rename-session
#
# Copy Mode
# - Quit is done with q, not with ESC
# - Searching in vi mode can be performed with '\' and '?'
# Plugins
# - To fetch plugins we use prefix + I (as in Install)
# - Path for bitbucket plugins is: '[email protected]/user/plugin'
# Bind Parameters
# [-n]: skips prefix
# [-r]: allows repetition
# [-t pane]: affected pane (default is current)
#
# Leftovers
# - Avoid Ctrl-l deleting the whole buffer
# - Look into 'https://github.com/ryandotsmith/tat'
# [GENERAL]
set -g prefix C-a # better prefix
set -g status off # out of my sight
set -g mouse on # mouse activated
set -s set-clipboard off # disable broken copy
setw -g xterm-keys on # ctrl-shift vim enable
setw -g mode-keys vi # copy mode's mode
#set -g default-shell /usr/bin/fish # either fish or bash
set -g default-terminal xterm-256color # alt: screen-256color
# [BINDINGS]
# Reset
# https://unix.stackexchange.com/questions/57641/reload-of-tmux-config-not-unbinding-keys-bind-key-is-cumulative
source-file ~/.dotfiles/.default.tmux.conf
# Reload
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config.'
# Close
bind k kill-session
# Copy Mode (y to copy)
bind m copy-mode
# Pane splitting
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"
# Pane switching
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Pane resizing
bind -r Left resize-pane -L
bind -r Right resize-pane -R
bind -r Up resize-pane -U
bind -r Down resize-pane -D
# [PARTICULAR]
set -g @resurrect-capture-pane-contents 'on' # exact restore
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) (ok)
run '~/.tmux/plugins/tpm/tpm'