Created
April 26, 2020 16:38
-
-
Save x1nchen/9bb5e4a3a6cf0aa98f7bbe1251a2b699 to your computer and use it in GitHub Desktop.
tmux config file
This file contains 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
set -g bell-action any | |
set -g terminal-overrides 'rxvt-unicode*:sitm@,ritm@' | |
# Bind the basic hotkey and default shell | |
unbind C-b | |
set -g prefix C-x | |
set -g status-keys emacs | |
set -gw mode-keys emacs | |
# Bind the copy use reattach-to-user-namespace | |
#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL" | |
#bind-key -t emacs-copy M-w copy-pipe 'reattach-to-user-namespace pbcopy' | |
bind-key -n C-y paste-buffer | |
# Bind reload tmux config hotkey | |
set-option -g history-limit 30000 | |
bind r source-file ~/.tmux.conf \; display-message "Reloading tmux config ..." | |
# Bind resize panel hotkeys | |
bind-key -nr C-M-P resize-pane -U 1 | |
bind-key -nr C-M-N resize-pane -D 1 | |
bind-key -nr C-M-F resize-pane -R 1 | |
bind-key -nr C-M-B resize-pane -L 1 | |
# Bind select other panel hotkeys | |
bind-key -n M-k select-pane -U | |
bind-key -n M-j select-pane -D | |
bind-key -n M-l select-pane -R | |
bind-key -n M-h select-pane -L | |
# Bind split panel from emacs | |
bind-key o display-panes | |
bind-key 2 split-window | |
bind-key 3 split-window -h | |
bind-key 4 split-window -c "#{pane_current_path}" | |
bind-key 5 split-window -h -c "#{pane_current_path}" | |
# Bind select next,previous panel hotkey | |
bind-key -nr M-, previous-window | |
bind-key -nr M-. next-window | |
# start window indexing at one instead of zero | |
set-option -g base-index 1 | |
set-window-option -g pane-base-index 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment