Skip to content

Instantly share code, notes, and snippets.

@lowe0292
Last active December 4, 2015 21:51
Show Gist options
  • Save lowe0292/af5748926a52948709eb to your computer and use it in GitHub Desktop.
Save lowe0292/af5748926a52948709eb to your computer and use it in GitHub Desktop.
Tmux config that plays nicely with vim
# setup seamless navigation between tmux & vim
bind -n C-h run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# remap prefix from ctrl-b to ctrl-a
set -g prefix C-a
# remap hotkeys for splitting panes
bind \ split-window -h # Split panes horizontal
bind - split-window -v # Split panes vertically
# remap hotkeys for resizing panes
bind l resize-pane -R 25
bind j resize-pane -D 10
bind k resize-pane -U 10
bind h resize-pane -L 25
# remap detach
bind-key C-d detach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment