Skip to content

Instantly share code, notes, and snippets.

@x1nchen
Created April 26, 2020 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x1nchen/9bb5e4a3a6cf0aa98f7bbe1251a2b699 to your computer and use it in GitHub Desktop.
Save x1nchen/9bb5e4a3a6cf0aa98f7bbe1251a2b699 to your computer and use it in GitHub Desktop.
tmux config file
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