Skip to content

Instantly share code, notes, and snippets.

@AlanWarren
Created September 16, 2019 15: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 AlanWarren/7fa73030f906e0587c849b9f92359fb2 to your computer and use it in GitHub Desktop.
Save AlanWarren/7fa73030f906e0587c849b9f92359fb2 to your computer and use it in GitHub Desktop.
#setup truecolor
set-option -ga terminal-overrides ',xterm*:Tc:sitm=\E[3m'
set -g base-index 1
set -g focus-events on
#Automatically set window title
#set-window-option -g automatic-rename on
set-option -g set-titles on
set-option -g set-titles-string " "
set-option -g default-shell /usr/local/bin/zsh
set-option -g allow-rename off
set -g status-keys vi
set -g history-limit 10000
setw -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe "reattach-to-user-namespace pbcopy" \; display-message "copied to system clipboard"
# make Enter use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe "reattach-to-user-namespace pbcopy"
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
#setw -g mode-mouse on
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key w run-shell 'tmux choose-tree -Nwf"##{==:##{session_name},#{session_name}}"'
bind-key @ choose-window 'join-pane -h -s "%%"'
#vim style pane selection
bind -n M-C-h select-pane -L
bind -n M-C-j select-pane -D
bind -n M-C-k select-pane -U
bind -n M-C-l select-pane -R
# ctrl-b + alt-o rotates windows
bind -n M-8 previous-window
bind -n M-9 next-window
#timeout for hitting esc key
set -sg escape-time 0
#Reload tmux conf
bind r source-file ~/.tmux.conf
#Window mode
#setw -g mode-bg colour13
#setw -g mode-fg colour0
set -g default-terminal "tmux-256color"
#set -g default-terminal "screen-256color"
# Statusline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment