-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
72 lines (59 loc) · 1.96 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
60
61
62
63
64
65
66
67
68
69
70
71
72
############################
#### Configuration
############################
#
# set Zsh as your default Tmux shell
set-option -g default-shell /bin/zsh
# use 256 term for pretty colors
set -g default-terminal "screen-256color"
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# saner split pane commands
bind | split-window -h
bind - split-window -v
# reload config file
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded"
# switch panes using vim bindings or arrows
bind Up select-pane -U
bind k select-pane -U
bind Down select-pane -D
bind j select-pane -D
bind Left select-pane -L
bind h select-pane -L
bind Right select-pane -R
bind l select-pane -R
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
###########################
## tmux Copy & Paste
############################
#
# https://robots.thoughtbot.com/tmux-copy-paste-on-os-x-a-better-future
# 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 -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# 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"
###########################
## Colors
############################
# color status bar
set -g status-bg colour235
set -g status-fg white
# highlight current window
#set-window-option -g window-status-current-fg black
#set-window-option -g window-status-current-bg green
# set color of active pane
#set -g pane-border-fg colour235
#set -g pane-border-bg black
#set -g pane-active-border-fg green
#set -g pane-active-border-bg black
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key M split-window -h "vim ~/.tmux.conf"