-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
40 lines (31 loc) · 1.2 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
# Reasonable prefix
set -g prefix C-f
unbind-key C-f
bind-key C-f send-prefix
# Default is pathetic
set-option -g history-limit 50000
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in 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"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Vim-like splits
bind-key v split-window -h
bind-key s split-window -v
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# No delay for escape key press
set -sg escape-time 0
# Pick up System Preferences changes, see:
# http://stackoverflow.com/questions/44058038/system-default-voice-doesnt-change-on-say-command-within-tmux-sessions/44078385#44078385
set-option -g default-command "reattach-to-user-namespace -l $SHELL"
# Easily kill tmux session and processes within it
run-shell ~/.dotfiles/tmux/safekill.tmux