-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
73 lines (55 loc) · 2.25 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
# Run vi mode
set-window-option -g mode-keys vi
# Enable mouse support if desired
set -g mouse on
# Allow arrow key to be used just after changing window
set-option -g repeat-time 0
# Set no gap for window index
set-option -g renumber-windows on
# Label window name to current directory
set-window-option -g window-status-current-format '#[fg=white,bold]** #{window_index} #[fg=green]#{pane_current_command} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d "/" -f-3 | rev) #[fg=white]**|'
set-window-option -g window-status-format '#[fg=white,bold] #{window_index} #[fg=green]#{pane_current_command} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d "/" -f-3 | rev) #[fg=white]|'
# Unbind all keys to use custom bind only used keys
unbind-key -a
# Use C-f, since it's on the home row and easier to hit than C-b
set-option -g prefix C-f
bind-key C-f send-prefix
set -g base-index 1
# Enable extended keys for better key handling in tmux 3.x
set -g extended-keys on
#set -g extended-keys-format "vi"
# Bind keys
bind x confirm kill-window
bind X confirm kill-server
bind-key c new-window
bind-key [ swap-pane -U
bind-key ] swap-pane -D
bind-key -n C-S-Left swap-window -d -t -1
bind-key -n C-S-Right swap-window -d -t +1
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key p last-window
bind-key 0 select-window -t :0
bind-key 1 select-window -t :1
bind-key 2 select-window -t :2
bind-key 3 select-window -t :3
bind-key 4 select-window -t :4
bind-key 5 select-window -t :5
bind-key 6 select-window -t :6
bind-key 7 select-window -t :7
bind-key 8 select-window -t :8
bind-key 9 select-window -t :9
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key Down resize-pane -D 5
bind-key Up resize-pane -U 5
bind-key Left resize-pane -L 5
bind-key Right resize-pane -R 5
bind-key g copy-mode
bind-key b paste-buffer
# Adjust copy mode bindings for vi mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
if-shell "uname | grep -q Darwin" "bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel \'pbcopy\'"
if-shell "uname | grep -q Linux" "bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel \'xclip -in -selection clipboard\'"