Skip to content

Instantly share code, notes, and snippets.

@dylanerichards
Created November 7, 2014 05:59
Show Gist options
  • Select an option

  • Save dylanerichards/f7879e58fb82bafe5787 to your computer and use it in GitHub Desktop.

Select an option

Save dylanerichards/f7879e58fb82bafe5787 to your computer and use it in GitHub Desktop.
Tmux configuration file
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
set -g default-terminal "screen-256color"
# set -g status-bg colour235
# set -g status-fg white
# set-window-option -g window-status-current-fg black
# set-window-option -g window-status-current-bg green
# set -g pane-border-fg colour235
# set -g pane-border-bg black
# set -g pane-active-border-fg green
# set -g pane-active-border-bg black
run-shell ~/clone/path/resurrect.tmux
set-option -g pane-active-border-fg blue
# Remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
set-window-option -g mode-mouse on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment