Created
April 15, 2022 15:43
-
-
Save O1ahmad/762735dbfe049b8e1a84246987e9d08d to your computer and use it in GitHub Desktop.
custom tmux config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file is managed by Ansible. Any changes will be overwritten. | |
# | |
# see: tmux man specification -- http://man7.org/linux/man-pages/man1/tmux.1.html for more details | |
# Add ctrl-A as secondary prefix key | |
set -g prefix2 C-a | |
bind C-a send-prefix -2 | |
# Bind current vertical/horizontal split-window keys to values not requiring ^(shift) | |
bind - split-window -v | |
bind / split-window -h | |
# More convenient macros for general operations | |
bind C-n new-session | |
bind C-w new-window | |
bind C-d detach-client | |
bind C-p paste-buffer | |
bind R refresh-client | |
unbind r; bind r source-file ~/.tmux.conf | |
# set first window to index 1 (not 0) to map more to the keyboard layout | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
# Enable use of the mouse to switch panes | |
setw -g mouse | |
# Enable Switching panes with alt | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# Visual Activity Monitoring between windows | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# install TPM plugin manager | |
set -g @plugin 'tmux-plugins/tpm' | |
# tmux-resurrect - save and reload sessions and windows after a restart | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @resurrect-strategy-vim 'session' | |
set -g @resurrect-capture-pane-contents 'on' | |
set -g @resurrect-save-bash-history 'on' | |
# tmux-continuum - automatically save and restore tmux sessions | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @continuum-restore 'on' | |
set -g @continuum-save-interval '5' | |
# tmux-yank - advanced copy mode | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
# tmux-sidebar - provides tree view for inspecting current path/filesystem | |
set -g @plugin 'tmux-plugins/tmux-sidebar' | |
# tmux-open - opening highlighted selection directly from Tmux copy mode | |
set -g @plugin 'tmux-plugins/tmux-open' | |
# tmux-copycat - advanced regex searching | |
set -g @plugin 'tmux-plugins/tmux-copycat' | |
# initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment