-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
36 lines (28 loc) · 1.11 KB
/
Copy pathtmux.conf
File metadata and controls
36 lines (28 loc) · 1.11 KB
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
# Set prefix to Ctrl-A
unbind-key C-b
set -g prefix C-a
bind-key C-a send-prefix
# Disable auto-renaming of windows (e.g. after ssh'ing to a host)
set-window-option -g automatic-rename off
set-option -g allow-rename off
# Set mouse mode on
#set-window-option -g mode-mouse on
set -g history-limit 30000
set -s escape-time 0
# Enable vim mode for copying
setw -g mode-keys vi
# Vim colors
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",screen-256color:Tc"
# Now make copy use y/v like vim
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Smart pane switching with awareness of vim splits
# Source: https://gist.github.com/mislav/5189704
bind -n C-k run-shell '$HOME/bin/tmux-vim-select-pane -U'
bind -n C-j run-shell '$HOME/bin/tmux-vim-select-pane -D'
bind -n C-h run-shell '$HOME/bin/tmux-vim-select-pane -L'
bind -n C-l run-shell '$HOME/bin/tmux-vim-select-pane -R'
bind -n "C-\\" run-shell '$HOME/bin/tmux-vim-select-pane -l'
# Bring back clear screen under tmux prefix
bind C-l send-keys 'C-l'