forked from Wentzell/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
71 lines (58 loc) · 2.09 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
#################### TMUX CONF ####################
# {{{ Unbind first
unbind-key C-b #no more C^b
unbind-key [
# }}}
# {{{ Options
#set -g base-index 1
#set-window-option -g pane-base-index 1
set-option -g default-terminal "xterm-256color"
#set -g default-terminal "tmux"
set-option -g default-shell /usr/bin/zsh
# -- vi mode
#set-window-option -g mode-keys vi
set -g status-keys vi
set -g repeat-time 1000
#set -g status-utf8 on
set -sg escape-time 0
# }}}
# {{{ prefix
# Semicolon is the only key that isn't bound by readline
# this creates a problem inside of ttys...
set-option -g prefix C-f
bind-key f send-prefix
# }}}
# Key bindings {{{
bind-key r source-file ~/.tmux.conf \; display-message "source-file done"
# All sorts of Vi-type bindings
# https://github.com/justone/dotfiles/blob/personal/.tmux.shared#L3
# VI for switching between
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key s splitw -v
bind-key v splitw -h
bind-key S choose-session
# keybindings to make resizing easier
bind-key -r C-h resize-pane -L
bind-key -r C-j resize-pane -D
bind-key -r C-k resize-pane -U
bind-key -r C-l resize-pane -R
bind-key | resize-pane -Z \; display-message "Zoom zoom zoom"
# Pane movement
bind-key J command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key B command-prompt -p "break pane to:" "break-pane -t '%%'"
bind-key M-k move-pane -t ':+'
bind-key M-j move-pane -t ':-'
# Vi copy and paste in tmux
# http://joncairns.com/2013/06/copying-between-tmux-buffers-and-the-system-clipboard/
bind-key Escape copy-mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
bind-key 'P' paste-buffer
#}}}
# only if this is the first level of inception do that fancy status bar
# System Specific {{{
if-shell 'test "$(uname -s)" = "Darwin"' 'bind-key y run-shell "tmux show-buffer | pbcopy" \; display-message "Copied tmux buffer to system clipboard"'
if-shell 'test "$(uname -s)" = "Linux"' 'bind-key y run-shell "tmux show-buffer | xsel -pi" \; display-message "Copied tmux buffer to system clipboard"'