-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
90 lines (67 loc) · 2.69 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
# look good
set -g default-terminal "screen-256color"
# make delay minimal
# set escape-time 1
set -sg escape-time 0
# shortcut for reloading config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# better pane splitting
bind-key - split-window -v -c '#{pane_current_path}'
bind-key \ split-window -h -c '#{pane_current_path}'
bind c new-window -c "#{pane_current_path}"
bind-key b break-pane -d
# mouse
set-option -g mouse on
# resizing
bind -n S-Left resize-pane -L 6
bind -n S-Right resize-pane -R 6
bind -n S-Down resize-pane -D 3
bind -n S-Up resize-pane -U 3
# color status bar
set -g status-bg black
set -g status-fg white
# highlight current window
set-window-option -g window-status-current-fg black
set-window-option -g window-status-current-bg white
# set color of active pane
#set -g pane-border-fg black
#set -g status-left-length 10
#set -g status-left ""
#set -g status-right ""
#set-option -g status-utf8 on
#set -g status-interval 60
set -g status-justify left
setw -g monitor-activity off
set -g visual-activity off
# http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-splits
# smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# this will renumber windows automatically when one gets deleted
set-option -g renumber-windows on
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
bind-key [ copy-mode
set -g history-limit 10000
bind C-j split-window -v "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'nhdaly/tmux-scroll-copy-mode'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'