forked from pfleidi/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
53 lines (41 loc) · 1.23 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
# pfleidi's tmux config
# Fix copy/paste: brew install reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l zsh"
# UTF8
set-option -g status-utf8 on
# mouse support
set-option -g mouse-select-pane on
setw -g mode-mouse on
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# vim copy selection
bind-key ESCAPE copy-mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# resize panes like vim
bind < resize-pane -L 2
bind > resize-pane -R 2
bind - resize-pane -D 2
bind + resize-pane -U 2
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# copy/paste
bind C-p run "tmux set-buffer \\"$(pbpaste)\\"; tmux paste-buffer"
bind C-y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# look good
set -g default-terminal "screen-256color"
set -g status-left '#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]'
set-option -g status-bg black
set-option -g status-fg white
setw -g window-status-bg black
setw -g window-status-current-fg yellow