-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
79 lines (63 loc) · 2.21 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
# https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# https://gist.github.com/ryerh/14b7c24dfd623ef8edc7
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# https://stackoverflow.com/questions/27307815/how-do-i-change-the-starting-directory-of-a-tmux-session#:~:text=you%20can%20use%20tmux%20command,as%20default%20in%20new%20panes.
bind c new-window -c "#{pane_current_path}"
# split panes using | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# https://unix.stackexchange.com/a/342049
bind Escape copy-mode
# https://unix.stackexchange.com/questions/396005/tmux-copy-mode-home-and-end-keys/397017#397017
bind -T copy-mode-vi 'Home' send 0
bind -T copy-mode-vi 'End' send $
# switch panes using hjkl
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind m resize-pane -Z
# resize window
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
set -g base-index 1
set -g display-panes-time 1000
set -g pane-base-index 1
set -g renumber-windows on
# https://vimawesome.com/plugin/vim-numbertoggle
set-option -g focus-events on
setw -g allow-rename on
setw -g automatic-rename off
setw -g mode-keys vi
# TPM
# https://github.com/tmux-plugins/tpm
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Terminal True color support
# https://github.com/tmux/tmux/issues/1246
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
# tmux theme
set -g @plugin "janoamaral/tokyo-night-tmux"
# useful plugin
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'thuanOwa/tmux-fzf-session-switch'
set -g @fzf-goto-session 's'
# history limit
set -g history-limit 100000
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'