Skip to content

Instantly share code, notes, and snippets.

@Partyschaum
Created May 9, 2014 09:59
Show Gist options
  • Save Partyschaum/6f7c21d6f0241891cd16 to your computer and use it in GitHub Desktop.
Save Partyschaum/6f7c21d6f0241891cd16 to your computer and use it in GitHub Desktop.
My tmux configuration
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
# Ensure using my shell
set-option -g default-shell /bin/zsh
# Restoring Clear Screen
bind C-l send-keys 'C-l'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment