-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
executable file
·93 lines (73 loc) · 2.73 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
82
83
84
85
86
87
88
89
90
91
92
93
# http://robots.thoughtbot.com/post/19398560514/how-to-copy-and-paste-with-tmux-on-mac-os-x
# brew install reattach-to-user-namespace
# http://superuser.com/questions/231130/unable-to-use-pbcopy-while-in-tmux-session
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
#set-option -g default-command "reattach-to-user-namespace -l zsh"
# https://github.com/tmux/tmux/issues/34
set -g default-terminal "xterm-256color"
#set-option -ga terminal-overrides ",xterm-256color:Tc"
set-option -ga terminal-overrides ",xterm-256color:Tc"
setw -g xterm-keys on
set -g status-bg white
set -g status-fg black
bind C-d detach
# Set previx to ctrl+a
set -g prefix C-a
# Send the prefix to an app by pressing prefix twice
bind C-a send-prefix
unbind C-b
# Change escape time for vim
set -sg escape-time 1
# Set window index start to 1 (default 0)
set -g base-index 1
# Reload sourcefile
bind r source-file ~/.tmux.conf \; display "Reload!"
# Copy mode to vi keys
setw -g mode-keys vi
# Rebind cycling windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Change repeat time to 250ms
set-option -g repeat-time 500
# quick pane cycling
#unbind ^A
#bind ^A select-pane -t :.+
# Turn on mouse mode
#setw -g mode-mouse on
#set -g mouse-select-pane on
#set -g mouse-resize-pane on
#set -g mouse-select-window on
# Powerline
if-shell "test -f ~/.config/tmux/powerline" "source ~/.config/tmux/powerline"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'arcticicestudio/nord-tmux'
set -g @plugin 'tmux-plugins/tmux-pain-control'
# Resize window panes with vim cmds
# prefix + shift + h - resize current pane 5 cells to the left
# prefix + shift + j - resize current pane 5 cells up
# prefix + shift + k - resize current pane 5 cells down
# prefix + shift + l - resize current pane 5 cells to the right
# Rebind window splitting
# prefix + | - split current pane horizontally
# prefix + - - split current pane vertically
# Navigation
# prefix + h and prefix + C-h - select pane on the left
# prefix + j and prefix + C-j - select pane below the current one
# prefix + k and prefix + C-k - select pane above
# prefix + l and prefix + C-l - select pane on the right
# Tmux resurrect - Restore tmux environment after system restart
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# prefix + Ctrl-s - save
# prefix + Ctrl-r - restore
# https://github.com/tmux-plugins/tmux-yank
set -g @plugin 'tmux-plugins/tmux-yank'
unbind [
bind 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-and-cancel
# https://github.com/tmux-plugins/tmux-copycat
#set -g @plugin 'tmux-plugins/tmux-copycat'
run '~/.tmux/plugins/tpm/tpm'