Skip to content

Instantly share code, notes, and snippets.

@chapagainmanoj
Created November 20, 2019 03:50
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 chapagainmanoj/5c8252ba6a45f61d221041f5e9ac4312 to your computer and use it in GitHub Desktop.
Save chapagainmanoj/5c8252ba6a45f61d221041f5e9ac4312 to your computer and use it in GitHub Desktop.
# activity
set -g monitor-activity on
# default shell
# set-option -g default-shell /bin/zsh
# key bindings
# ctrl b to ctrl Space
set -g prefix C-space
unbind C-b
bind c-a send-prefix
# firt window to index 1
set -g base-index 1
set -g pane-base-index 1
unbind r
bind r source-file ~/.tmux.conf
unbind ^A
bind ^A select-pane -t :.+
# split panes with | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes without prefix using alt-arrow
bind -n M-Left select-pan -L
bind -n M-Right select-pan -R
bind -n M-Up select-pan -U
bind -n M-Down select-pan -D
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# tmux plugin manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# save and reload sessions and windows after restart
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-startegy-vim 'session'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-save-bash-history 'on'
# automatically save and restore tmux sessions
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @continuum-save-intercal '5'
# init tmux plugin manager at last
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment