-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
85 lines (64 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
74
75
76
77
78
79
80
81
82
83
84
85
# Thanks to Anish Athalye ('anishathalye' on github) for most of this config
#
# improve colors
set -g default-terminal 'screen-256color'
# vim keybindings
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 -r C-h select-window -t :-
bind -r C-l select-window -t :+
# tmux -V >= 2.4
bind -T copy-mode-vi "v" send -X begin-selection
bind -T copy-mode-vi "V" send -X rectangle-toggle
bind -T copy-mode-vi "y" send -X copy-selection-and-cancel
# tmux -V < 2.4
# bind -t vi-copy "v" begin-selection
# bind -t vi-copy "V" rectangle-toggle
# bind -t vi-copy "y" copy-selection
# GNU Screen keybindings
unbind C-b
set -g prefix C-a
bind a send-prefix
bind b send-prefix
# new windows/panes in same directory
bind c new-window -c "#{pane_current_path}"
bind "\"" split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# enable and disable keyboard input for panes
bind < select-pane -d \; display-message "input disabled";
bind > select-pane -e \; display-message "input enabled";
# size windows based on clients looking at that window
setw -g aggressive-resize on
# mouse control
set -g mouse on
# start window numbers at 1 to match keyboard order with tmux order
set -g base-index 1
# same but with panes
setw -g pane-base-index 1
# easy pane resising
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
# reenable automatic renaming for current window
bind N setw automatic-rename on \; display-message "automatic rename enabled"
# renumber windows sequentially after closing
set -g renumber-windows on
# monitor windows for activity
setw -g monitor-activity on
# don't wait for escape sequences
set -sg escape-time 0
# display pane numbers for longer period
set -g display-panes-time 2000
# increase scrollback lines
set -g history-limit 65536
# keybinding for history clearing
bind C-k clear-history \; display-message "history cleared"
# C-b ! breaks current pane into separate window
# join a pane/window from the current session into the current window
bind @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
# reload tmux.conf file with Ctrl-r
bind C-r source-file ~/.tmux.conf \; display-message "configuration reloaded"