-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
63 lines (47 loc) · 1.41 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
unbind C-b
set -g prefix C-w
bind C-w send-prefix
set-option -g history-limit 9999
setw -g mode-keys vi
set -sg escape-time 0
set -g renumber-windows on # renumber windows when a window is closed
# set -g default-terminal "screen-256color"
set -g base-index 1
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# ----------
# copy mode
# ----------
# set-option -g default-command "reattach-to-user-namespace -l zsh"
set-option -g default-shell /bin/zsh
bind b copy-mode
# selection
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"
# cancel copy mode
bind -T copy-mode-vi C-g send -X cancel
bind -T copy-mode-vi i send -X cancel
bind -T copy-mode-vi I send -X cancel
bind -T copy-mode-vi a send -X cancel
bind -T copy-mode-vi A send -X cancel
bind -T copy-mode-vi o send -X cancel
bind -T copy-mode-vi O send -X cancel
# panes
# x to kill
bind v split-window -h
bind s split-window -v
# cycle panes
bind w select-pane -t :.+
bind C-w select-pane -t :.+
# kill other panes
unbind o
bind o kill-pane -a
# pane movement
bind-key J command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key S command-prompt -p "send pane to:" "join-pane -t '%%'"
# windows
# c to create
bind q confirm-before -p "kill-window #W? (y/n)" kill-window
# choose window
bind a choose-tree -w
# tail log
bind l send C-c 'cl' Enter 'tl' Enter