-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
90 lines (76 loc) · 1.9 KB
/
dot_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
82
83
84
85
86
87
88
89
90
#############
# Options #
#############
set -gw xterm-keys on
set -g set-titles on
set -g set-titles-string '#h [#S]:#I #W'
set -g automatic-rename on
############
# Prefix #
############
unbind C-b
set -g prefix C-a
bind a send-prefix
##########################
# VIM-like Keybindings #
##########################
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize
unbind Left
unbind Right
unbind Down
unbind Up
bind -r Left resize-pane -L 2
bind -r Right resize-pane -R 2
bind -r Down resize-pane -D 2
bind -r Up resize-pane -U 2
# vi-style controls for copy mode
setw -g mode-keys vi
################
# Navigation #
################
bind -n C-Tab next-window
bind -n C-S-Tab previous-window
bind C-^ last-window
bind C-a last-window
bind -r C-Left swap-window -t -1
bind -r C-Right swap-window -t +1
##########
# Copy #
##########
bind y copy-mode
bind ESCAPE copy-mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy
unbind -T copy-mode-vi Space
bind-key -T copy-mode-vi Space send-keys -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c"
###########
# Mouse #
###########
set -g mouse on
##########
# Misc #
##########
bind K confirm kill-server
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color*:Tc"
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
###########
# Plugins #
###########
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'wfxr/tmux-power'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'