-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
47 lines (38 loc) · 1.22 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
set -g mouse on
set -s escape-time 0
# rebind 'C-b to 'C-Space'
unbind C-b
set-option -g prefix C-Space
bind-key C-Space send-prefix
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# switch panes using Alt-arrow without prefix
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
# resize panes more easily
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
#colors
set -g default-terminal "screen-256color"
set -g status-bg colour69
# open new panes/windows in cwd
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
bind c new-window -c '#{pane_current_path}' # Create new window
# set vi mode
setw -g mode-keys vi
#copy/paste in vi mode
#unbind p
#bind p paste-buffer
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
bind C-y run "tmux save-buffer - | xclip -i"