Skip to content

Instantly share code, notes, and snippets.

@ajayhn
Last active June 5, 2017 02:50
Show Gist options
  • Save ajayhn/f4626e2c1848c335436372488c11d99a to your computer and use it in GitHub Desktop.
Save ajayhn/f4626e2c1848c335436372488c11d99a to your computer and use it in GitHub Desktop.
tmux settings
# unset C-b as leader and set backtick as leader
unbind C-b
set-option -g prefix `
# backtick+e for backtick
bind e send-prefix
# backtick+backtick for toggle
bind ` last-window
# vi mode please!
set-window-option -g mode-keys vi
# large buffer for scrolling
set-option -g history-limit 20000
# Reload the file with Prefix r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# splitting panes with \ and - in same dir
bind \ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# moving between panes with Prefix h,j,k,l
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# RUN below to install plugin manager
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -sg escape-time 0
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# Download/enable plugins first time with `-I.
# good regex search
set -g @plugin 'tmux-plugins/tmux-copycat'
# `-C-s to save, `-C-r to restore after reboot
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Run the plugin manager
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment