Skip to content

Instantly share code, notes, and snippets.

@kevin47
Created May 6, 2021 08:16
Show Gist options
  • Save kevin47/f7c3d36eed8ea5d6b55f3f6520e3c7df to your computer and use it in GitHub Desktop.
Save kevin47/f7c3d36eed8ea5d6b55f3f6520e3c7df to your computer and use it in GitHub Desktop.
# Mouse mode
set-option -g mouse on
# Shift + arrow to switch pane
#bind-key C-h select-pane -L
#bind-key C-l select-pane -R
#bind-key C-k select-pane -U
#bind-key C-j select-pane -D
# Use Ctrl-arrow keys without prefix key to switch panes
bind-key -n C-k select-pane -U
bind-key -n C-j select-pane -D
bind-key -n C-h select-pane -L
bind-key -n C-l select-pane -R
# Alt + hl to switch window
bind-key -n M-h previous-window
bind-key -n M-l next-window
bind-key -r M-h swap-window -t -1
bind-key -r M-l swap-window -t +1
# copy & paste
#bind -t vi-copy y copy-pipe "xclip -sel clip -i"
# split pane
bind \ split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind - split-window -v -c '#{pane_current_path}' # Split panes vertically
# move x clipboard into tmux paste buffer
#bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
#bind C-y run "tmux save-buffer - | xclip -i"
set -g default-terminal "screen-256color"
set -g update-environment "SSH_AUTH_SOCK SSH_ASKPASS WINDOWID SSH_CONNECTION XAUTHORITY"
#set -g update-environment "SSH_ASKPASS WINDOWID SSH_CONNECTION XAUTHORITY"
# scrollback buffer n lines
set -g history-limit 100000
# address vim mode switching delay
set -s escape-time 0
# save session plugin
set -g @plugin 'tmux-plugins/tmux-resurrect'
# bottom bar color
set -g status-bg colour140
# highlight color
set-window-option -g mode-bg colour216
# split line style
set -g pane-border-style-fg default
set -g pane-border-style-bg colour118
set-option -g pane-active-border-fg colour118
set-option -g pane-active-border-bg default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment