forked from faun/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
59 lines (47 loc) · 1.4 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
# Tell tmux to use zsh
set-option -g default-shell $SHELL
# Make it use C-a, similar to screen...
unbind C-b # don't use control-b to invoke
set -g prefix C-a # use control-a instead
bind C-a send-prefix # but restore control-a readline binding by pressing control-a twice
# Split panes with "control-a |" and "control-a \"
unbind %
bind | split-window -h
bind \ split-window -v
# Change windows with tab
unbind Tab
bind Tab next
unbind BTab
bind BTab prev
# Start window numbering at 1
set -g base-index 1
# Reload tmux config with control-a r
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded tmux config file."
# Allow full color
set -g default-terminal "screen-256color"
# History
set -g history-limit 1000
# Mouse settings
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mouse-resize-pane on
set-option -g mouse-utf8 on
set-window-option -g mode-mouse on
set-window-option -g xterm-keys on
# Copy mode
setw -g mode-keys vi
bind ` copy-mode
unbind [
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# requires brew install reattach-to-user-namespace
# Add to .tmux.local
# set-option -g default-command "reattach-to-user-namespace -l zsh
# Remove exit lag for insert mode in vim
set -sg escape-time 0
source ~/.tmux.local