-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
81 lines (61 loc) · 2.35 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
# Change prefix to C-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# Fix neovim colours, from: https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
# set vi mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# mouse behavior
setw -g mouse on
# scroll by 1 line
bind-key -T copy-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X scroll-down
# disable wrapping on search to make it less confusing when using ']'
set-option -g wrap-search off
# use `]` and `[` to jump to the next/previous prompt in copy mode
bind -Tcopy-mode-vi [ send -X search-backward '' \; send-keys z
bind -Tcopy-mode-vi ] send -X search-forward '' \; send-keys z
# use vim-like keys for splits and windows
bind-key v split-window -h -c '#{pane_current_path}' # use current path for new split
bind-key s split-window -v -c '#{pane_current_path}'
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key L next-window
bind-key H previous-window
bind-key x kill-pane # close current pane without confirmation
bind-key X kill-pane -a # close all other panes
set-window-option -g other-pane-height 25
set-window-option -g other-pane-width 80
set-window-option -g display-panes-time 1500
# switch layouts and make them smaler
bind-key + select-layout main-horizontal
bind-key = select-layout main-vertical
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
set-option -g focus-events on
# Fix esc delay in vim
set -sg escape-time 1
# Set status bar position to top
set -g status-position top
# Add padding under the status bar
set-window-option -g pane-border-status top
set-window-option -g pane-border-format ''
# dracula theme
set -g @plugin 'dracula/tmux'
set -g @dracula-plugins "battery"
run -b '~/.tmux/plugins/tpm/tpm' # keep this at the end of the file