-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
90 lines (72 loc) · 2.75 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
# Configuration file for tmux
#
# To reload settings: 'tmux source-file ~/.tmux.conf' or '<prefix>-R'.
#
# To enter the tmux command prompt: '<prefix>-:'
#
# Plugins are managed by the tmux Plugin Manager:
# https://github.com/tmux-plugins/tpm
#
# Sean Nesdoly
# Date created: 2021-01-19
# Use the correct default shell
set -g default-shell "$SHELL"
# Enable support for 256 colours
set -g default-terminal "screen-256color"
# Remap <prefix> (leader) key (default: C-b, where C=control).
#
# To make C-Space work on macOS, uncheck 'Select the previous input source'
# under System Preferences-->Keyboard-->Shortcuts-->Input Sources.
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Switch to the last window
# Also: <prefix>-: select-window -t:!
bind Tab last-window
# Directly swap consecutive windows, instead of juggling them with <prefix>-.
bind N swap-window -t +1\; select-window -t +1
bind P swap-window -t -1\; select-window -t -1
# Reload tmux configurations
bind R source-file "~/.tmux.conf" \; display-message "Sourced ~/.tmux.conf"
# Remove delay for triggering escape key
set -sg escape-time 0
# Maximum number of lines stored in history buffer, per pane
set -g history-limit 10000
# Always use Vim bindings (in case environment variable $EDITOR is not set)
set -g status-keys vi # command prompt in status line
setw -g mode-keys vi # buffer navigation in copy mode
bind -T copy-mode-vi v send -X begin-selection # start VISUAL selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel # yank text
# Create more intuitive key bindings for window splits
bind | split-window -h
bind - split-window -v
# Remap pane navigation keys to be Vim-like
bind h select-pane -L # move left
bind j select-pane -D # move down
bind k select-pane -U # move up
bind l select-pane -R # move right
# Remap pane resizing keys to be Vim-like
bind -r C-h resize-pane -L 1
bind -r C-j resize-pane -D 1
bind -r C-k resize-pane -U 1
bind -r C-l resize-pane -R 1
# Spread panes out evenly, Vim-like
bind C-w select-layout -E
# Renumber windows sequentially after closing any of them
set -g renumber-windows on
# Format & settings for status bar
set-option -g status-position top
set -g status-bg colour53
set -g status-fg colour255
set -g status-interval 1
set -g status-right "%Y-%m-%d %H:%M"
# ---------------------------- tmux Plugin Manager ----------------------------
# Key bindings:
# '<prefix>-I' -> install new plugins
# '<prefix>-U' -> update plugins
# '<prefix>-alt-u' -> uninstall plugins
set -g @plugin '[email protected]:tmux-plugins/tpm'
set -g @plugin '[email protected]:tmux-plugins/tmux-sensible'
set -g @plugin '[email protected]:tmux-plugins/tmux-yank'
# Initialize tmux plugin manager. Keep this line at the bottom of ~/.tmux.conf!
run '~/.tmux/plugins/tpm/tpm'