-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
37 lines (28 loc) · 1.3 KB
/
.tmux.conf
File metadata and controls
37 lines (28 loc) · 1.3 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
37
# start windows at 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# powerline integration for tmux
# source '/Users/judikdavid/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf'
# switch from <C-b> to <C-a>
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# not really sure what this does, but with it, the scrollwheel works inside Vim
set-option -g mouse on
# I originally had this as screen-256color, but this works
# out-of-the-box in more places
set -g default-terminal "screen"
# 256 colors
set -g terminal-overrides 'xterm:colors=256'
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
# bind-key -t vi-copy v begin-selection
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
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 vi-copy Enter
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M