-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
79 lines (63 loc) · 1.99 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
set -g default-terminal "screen-256color"
set-window-option -g mode-keys vi
# http://alexyoung.org/2011/12/19/build-an-ide-with-tmux-and-vim/
#
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# http://robots.thoughtbot.com/post/2166174647/love-hate-tmux?630b7c80
#
unbind C-b
set -g prefix C-x
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set-option -g default-command "reattach-to-user-namespace -l $SHELL"
# reload config
#
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# split windows
#
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# open new window in current dir
#
bind c new-window -c '#{pane_current_path}'
# resize panes
#
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# improve response
#
set -sg escape-time 1
# Vim copy and paste
#
# https://shapeshed.com/custom-vim-bindings-in-tmux-3-4/
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel
# system copy and paste
#
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer"
# Clear Screen
#
bind-key -n C-l send-keys "clear && tmux clear-history" \; send-keys "Enter"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'jimeh/tmux-themepack'
set -goqF @theme-status-fg colour247
set -g @themepack 'powerline/default/gray'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'