-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
68 lines (56 loc) · 2.1 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
##############################
##### JackyChiu ######
##### Tmux Dotfile ######
##############################
### KEY BINDINGS ###
# remap prefix to Control + a
set -g prefix C-a
# Bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b
# Split panes using | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# Resize windows
bind-key j resize-pane -D 20
bind-key k resize-pane -U 20
bind-key h resize-pane -L 20
bind-key l resize-pane -R 20
# Enable mouse mode
set -g mouse on
# Colours
set-option -ga terminal-overrides ",xterm-256color:Tc"
# macOS Sierra broke copy/paste in vim within tmux >:(
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
# Binding to still allow for clears
bind C-l send-keys 'C-l'
# vi-like navigation in scroll mode '<prefix> ['
bind-key -T copy-mode-vi WheelUpPane send -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send -X scroll-down
# # Vi copypaste
setw -g mode-keys vi
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" \; display-message "highlighted selection copied to system clipboard"
# Reload config file
bind r source-file ~/.tmux.conf
### VISUAL ###
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
###PLUGINS###
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'JackyChiu/tmux-onedark-theme'
set -g @onedark_time_format "%I:%M %p"
set -g @onedark_date_format "%a %d %b"
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'