-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
81 lines (63 loc) · 2.02 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
73
74
75
76
77
78
79
80
81
#set status-utf8 on
#set utf8 on
set -g default-terminal "screen-256color"
#set -g default-terminal "xterm-256color"
source "/usr/share/powerline/bindings/tmux/powerline.conf"
# remap prefix to Control + n
set -g prefix C-n
unbind C-b
bind C-n send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
###########################################################################
# Window management / navigation
# move between windows
bind-key C-p previous-window
bind-key C-n next-window
# C-\ (no prefix) to skip to last window we were in before this one
bind -n "C-Space" last-window
# C-Space (no prefix) to tab to next window
bind -n "C-\\" next-window
bind-key C-x kill-window
###########################################################################
# Pane management / navigation
# Horizontal splits with C-s
unbind C-s
bind-key s split-window
# Vertical split with C-v
unbind C-v
bind-key v split-window -h
# navigation with C-{h,j,k,l}
unbind C-h
unbind C-j
unbind C-k
unbind C-l
bind-key j select-pane -D
bind-key h select-pane -L
bind-key k select-pane -U
bind-key l select-pane -R
#for backspace
#unbind C-h
#unbind C-H
#unbind ^h
#unbind ^H
# Pane resize in all four directions using vi bindings.
# Can use these raw but I map them to Cmd-Opt-<h,j,k,l> in iTerm2.
# http://tangledhelix.com/blog/2012/04/28/iterm2-keymaps-for-tmux/
# Note on a few prefix options: C-a = 0x01, C-b = 0x02, C-g = 0x06
bind-key J resize-pane -D
bind-key K resize-pane -U
bind-key H resize-pane -L
bind-key L resize-pane -R
# vim binding in visual mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
#bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
set -g @continuum-restore 'on'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
run '~/.tmux/plugins/tpm/tpm'