Skip to content

Instantly share code, notes, and snippets.

@AlexWheeler
Created September 21, 2015 14:43
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 AlexWheeler/c7335b65d5761d9e7bf5 to your computer and use it in GitHub Desktop.
Save AlexWheeler/c7335b65d5761d9e7bf5 to your computer and use it in GitHub Desktop.
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
#clear screen w/ prefix 'c-l'
bind C-l send-keys 'C-l'
set -g default-terminal "screen-256color"
set -g utf8 on
set -g status-utf8 on
setw -g aggressive-resize on
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment