summary refs log tree commit diff
path: root/.tmux.conf
blob: 3aca3a99885354828c9c8eb4dd07c014ef40d0e1 (plain) (blame)
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
# Use the same prefix as screen, press a again to pass through
unbind C-b
set -g prefix C-a
bind a send-prefix

# Prevent escape key delay
set -g escape-time 0

# Enable colors
set -g default-terminal 'screen-256color'

# Start windows at 1 rather than 0
set -g base-index 1

# Tab bar status line
set -g status-position top
set -g status-left ' #S '
set -g status-left-fg black
set -g status-left-bg white
set -g window-status-separator ''
set -g window-status-format ' #W '
set -g window-status-current-format ' #W '
set -g window-status-current-fg green
set -g window-status-current-bg black
set -g status-right ' %Y-%m-%d %H:%M '
set -g status-right-fg black
set -g status-right-bg white

# Create new windows in same directory
bind t new-window -c '#{pane_current_path}'

# Move windows around by swapping
bind . command-prompt "swap-window -t '%%'"

# Split windows like vim, in same directory
bind s split-window -v -c '#{pane_current_path}'
bind v split-window -h -c '#{pane_current_path}'

# Move between panes like vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# Move panes sort of like vim
bind L swap-pane -D
bind H swap-pane -U

# Resize panes like vim
bind -r < resize-pane -L 1
bind -r > resize-pane -R 1
bind -r - resize-pane -D 1
bind -r + resize-pane -U 1

# Vi-style controls for copy mode
setw -g mode-keys vi

# Copy and Paste like vim
bind -t vi-copy v begin-selection
bind -t vi-copy C-v rectangle-toggle
bind -t vi-copy y copy-selection
bind p paste-buffer

# Switch panes like C-w C-w in vim
bind C-a last-pane

# Balance vertical panes
bind = select-layout even-horizontal