blob: 4d322c9f9fa4f9d09aec1991f04351c30c647094 (
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
|
# 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
# Status line on top
set -g status-position top
# 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
|