-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
80 lines (65 loc) · 2.5 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
# Use ALT-W as the prefix, not CTRL-B.
set -g prefix M-w
unbind C-b
set -g prefix2 'C-\'
# Turn on vi keybindings in copy mode, and make them Vim-like.
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection
# Mimic Vim's CTRL-W key bindings.
bind h select-pane -L
bind -r H resize-pane -L
bind j select-pane -D
bind -r J resize-pane -D
bind k select-pane -U
bind -r K resize-pane -U
bind l select-pane -R
bind -r L resize-pane -R
bind r rotate-window
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind x swap-pane
# Other key bindings.
bind M-w last-pane
bind C-j command-prompt -I ":2.0" "join-pane -h -s '%%'"
bind C-r resize-pane -x 80
bind b break-pane -d
bind S set-option status
# Default to opening windows with current directory (default keybindings).
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Yank to the system clipboard as well as the tmux paste buffer.
unbind -T copy-mode-vi Enter
bind -T copy-mode-vi Enter send -X copy-pipe "xclip -sel clip -i"
bind -T copy-mode-vi y send -X copy-pipe "xclip -sel clip -i"
# This is easy to hit accidentally - turn it off.
unbind Space
# Allow the mouse to interactive with tmux.
set -g mouse on
# Save a lot of history.
set -g history-limit 30000
# Make display messages last longer.
set -g display-time 3000
set -g display-panes-time 3000
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer
# access and to make Vim editing nicer.
set -sg escape-time 50
# Set xterm's title to the current pane's title.
set -g set-titles on
set -g set-titles-string '#T'
# Configure the status line.
set -g status-left ""
set -g window-status-separator "|"
set -g window-status-format " #I: #{b:pane_current_path} (#W) "
set -g window-status-current-format " #I: #{b:pane_current_path} (#W) "
set -g window-status-current-style "bg=brightgreen"
set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}\"#{=30:pane_title}\" [#S] #h"
set -g status-right-length 80
# Start numbering from 1, since 0 is all the way on the right of the keyboard.
set -g base-index 1
# Turn on 256-color mode.
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:Tc"
# Allow copying to clipboard.
set -s set-clipboard on