-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.tmux.conf
87 lines (65 loc) · 2.41 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
# Bind Prefix to C-Space
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# more intuitive splits
bind-key "|" split-window -h -c "#{pane_current_path}"
bind-key "\\" split-window -fh -c "#{pane_current_path}"
bind-key "-" split-window -v -c "#{pane_current_path}"
bind-key "_" split-window -fv -c "#{pane_current_path}"
# swap windows
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1
# join pane
bind-key j choose-window 'join-pane -h -s "%%"'
bind-key J choose-window 'join-pane -s "%%"'
## Toggle between windows
bind-key Space last-window
## Toggle between sessions
bind-key C-Space switch-client -l
# Add binding to reload tmux.conf for fast, iterative development
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded!"
# keep current path when creating new window
bind c new-window -c "#{pane_current_path}"
# go to a marked pane
bind \` switch-client -t'{marked}'
## Copy/paste
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind P paste-buffer
# Resizing pane
bind -r C-j resize-pane -D 15
bind -r C-k resize-pane -U 15
bind -r C-h resize-pane -L 15
bind -r C-l resize-pane -R 15
# Renumber windows sequentially after closing any of them.
# Otherwise if you close the second tab of three, you end up with tabs numbered 1 and 3
set -g renumber-windows on
# scroll, clickable windows and panes, resizable panes
set -g mouse on
# Default was 2000 lines
set -g history-limit 5000
# Prevent auto-renaming windows
set -g allow-rename off
# set window and pane index to 1 (default was 0)
set -g base-index 1
setw -g pane-base-index 1
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# set the default-terminal to use screen-256color
set -g default-terminal "xterm-256color"
# set -g default-terminal "screen-256color"
# Vi mode
setw -g mode-keys vi
# Tmux plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'dracula/tmux'
set -g @dracula-plugins "cpu-usage gpu-usage ram-usage"
set -g @dracula-plugins "battery cpu-usage git"
bind -n C-z run-shell "ps -o state= -o comm= -t '#{pane_tty}'"
# ***** Installing TPM: *****
# First, get tpm: `git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm`
# Second, install tpm plugins: Prefix + I
run '~/.tmux/plugins/tpm/tpm'