forked from justone/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
56 lines (43 loc) · 1.7 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
set -g default-shell /bin/zsh
set-option -g default-terminal "screen-256color"
# Use C-s (control and s key at the same time) as the prefix key
unbind C-b
set -g prefix C-s
# numbering
set -g base-index 1
# mindow management
bind-key C-a last-window
bind-key - split-window -v -c '#{pane_current_path}'
bind-key '\' split-window -h -c '#{pane_current_path}'
bind-key -n C-h select-pane -L
bind-key -n C-j select-pane -D
bind-key -n C-k select-pane -U
bind-key -n C-l select-pane -R
# Fine adjustment (1 or 2 cursor cells per bump) via `Shift+<arrow>`
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
# Pane zooming is bound by default to <prefix>z
set -g pane-border-status top
set -g pane-border-format "[#[fg=white]#{?pane_active,#[bold],} :#P: #T #[fg=default,nobold]]"
# session management
bind-key C-j choose-tree
# status bar
set-option -g status-bg white
set-option -g status-fg default
set-option -g status-left-length 50
set-option -g status-right " #(date '+%a, %b %d - %H:%M') "
# Vim key-bindings
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Use prefix C-l to clear the visible scrollback lines
bind C-l send-keys 'C-l'
# Use prefix C-k to clear the scrolled off (hidden) buffer lines
bind C-k clear-history
# set-option -g default-command "reattach-to-user-namespace -l zsh"