Skip to content

Instantly share code, notes, and snippets.

@kersny
Created July 12, 2013 16:46
Show Gist options
  • Save kersny/5985908 to your computer and use it in GitHub Desktop.
Save kersny/5985908 to your computer and use it in GitHub Desktop.
set-option -g prefix C-a
# tmux vim integration
# http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-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"
# preferred split commands
bind v split-window -h
bind s split-window -v
#mouse
setw -g mode-mouse on
setw -g mouse-select-pane on
# resize
bind-key + resize-pane -U 3
bind-key - resize-pane -D 3
setw -g renumber on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment