-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
84 lines (63 loc) · 2.15 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
# minimalist .tmux.conf
# source: https://docs.j7k6.org/my-minimal-tmux-setup/
# bash/zsh defaults
# (use zsh!!!)
set-option -g default-shell "/bin/bash"
# set-option -g default-shell "/bin/zsh"
# flags if active SSH session
if-shell 'test "$SSH_CONNECTION"' 'set -g status-bg red'
# enable mouse support
set -g mouse on
# prefix keys = {b}
# set-option -g prefix C-a
set-option -g prefix C-b
# copy mode w vim-like keybindings
setw -g mode-keys vi
# copy-paste keybindings for copy mode
bind p paste-buffer
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# "sticky command key" for repeating commands
# STICKY TIME = 0.4 sec
set -g repeat-time 400
# custom keybindings
# panes
# vim-like keybindings for switching panes
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# and for resizing panes
# pane resizing
bind -r H resize-pane -L
bind -r J resize-pane -D
bind -r K resize-pane -U
bind -r L resize-pane -R
# kills pane without confirmation
bind x kill-pane
# windows
bind -r _ split-window -h # split horizontally
bind -r - split-window -v # split vertically
# create
# bind c new-window
bind C new-session
# rename
bind-key r command-prompt 'rename-window %%'
bind-key R command-prompt 'rename-session %%'
# kill
bind q kill-window # kill window
bind Q kill-session # kill session
bind s source-file ~/.tmux.conf # reload tmux config
bind t select-layout tiled # tiled layout
# plugins via tpm
# P-I installs plugins, P-u updates them (P = prefix)
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
# mouse-selected text copied to clipboard
set -g @yank_selection_mouse 'clipboard' # or 'primary' or 'secondary'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'