Skip to content

Instantly share code, notes, and snippets.

@MarkZhangTW
Last active August 6, 2021 23:19
Show Gist options
  • Save MarkZhangTW/765cc564325488ac928817944c56a6ea to your computer and use it in GitHub Desktop.
Save MarkZhangTW/765cc564325488ac928817944c56a6ea to your computer and use it in GitHub Desktop.
My tmux configuration
# Status Bar Decoration
set-option -g status-style bg=colour22,fg=colour46
set-option -g window-status-style bg=colour28,fg=colour190
# Customizing status bar
set-option -g status-left-length 30
set-option -g status-left "#(echo $USER)@#(echo $HOSTNAME) [#S]"
set-option -g status-right-length 40
set-option -g status-right "%a, %d %b %Y %T %z"
set-option -g status-interval 1
set-option -g visual-bell on
# Starting the base index at 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# VI-style control in copy-mode
set-window-option -g mode-keys vi
# emacs-style control in status-line
set-option -g status-keys emacs
set-option -g repeat-time 200
# Binding some shortcuts
bind-key C-r source-file ~/.tmux.conf\; display "~/.tmux.conf reloaded."
bind-key C-l clear-history\; display "clear history"
bind-key C-c list-commands\; display "list commands"
# Move around panes with hjkl like VIM
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# Resize panes
bind -r M-h resize-pane -L 1
bind -r M-j resize-pane -D 1
bind -r M-k resize-pane -U 1
bind -r M-l resize-pane -R 1
# Change tmux prefix to `
unbind C-b
set-option -g prefix `
bind ` send-prefix
# Change tmux prefix to Esc
#unbind C-b
#set-option -s escape-time 0
#set-option -g prefix Escape
#bind Escape send-prefix
# Hide status bar
set -g status off
# Toggle status bar
bind t set-option status
# Enable 256 color
set-option -g default-terminal "screen-256color"
@MarkZhangTW
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment