Skip to content

Instantly share code, notes, and snippets.

@tonyc
Created January 24, 2014 15:58
Show Gist options
  • Save tonyc/8600125 to your computer and use it in GitHub Desktop.
Save tonyc/8600125 to your computer and use it in GitHub Desktop.
tmux config
set -g prefix C-a
unbind C-b
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf
bind | split-window -h
bind - split-window -v
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 H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment