-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
82 lines (67 loc) · 2.13 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
set-option -ga terminal-overrides ",xterm-256color*:Tc:smso"
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Start Window Numbering at 1
set -g base-index 1
setw -g aggressive-resize on
# use vi keys
setw -g mode-keys vi
# Allow to scroll forever
set-option -g history-limit 1000000
# Replace default keys for copy/paste ([ and ] respectively) with a workflow
# similar to Vim. Use this like so:
# Ctrl-a, Escape (enter copy mode)
# Move cursor to start or end of desired string.
# v
# Move cursor to cover the requisite string
# y -- capture the string
# q -- exit copy mode
# Ctrl-a, p -- put the text in the desired location
# unbind [
# bind Escape copy-mode
unbind p
bind p paste-buffer
## Use vim keybindings in copy mode
set-option -g mouse on
setw -g mode-keys vi
set-option -s set-clipboard off
bind P paste-buffer
## yank
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# window splitting
unbind %
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
# vim motion key to move between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
# shortcut for synchronizing panes.
bind-key y set-window-option synchronize-panes
# quickly set even-horizontal layout
bind C-s select-layout even-horizontal
# List of plugins
# # Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
'
# # 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'
set -sg escape-time 0