From f224133df2f3a328dea7a74134f6fb2047cc5cda Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Fri, 21 Mar 2014 16:59:55 -0700 Subject: [PATCH] update vundle, update tmux and vimrc to allow cross-split navigation --- tmux-files/tmux.conf | 7 +++++++ vim-files/vim/bundle/vundle | 2 +- vim-files/vimrc | 8 +------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tmux-files/tmux.conf b/tmux-files/tmux.conf index b41b490..f4b8aed 100644 --- a/tmux-files/tmux.conf +++ b/tmux-files/tmux.conf @@ -35,3 +35,10 @@ set -g mouse-select-window on # big scrollback set -g history-limit 10240 + +# 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" diff --git a/vim-files/vim/bundle/vundle b/vim-files/vim/bundle/vundle index 2d2690e..eb5ae19 160000 --- a/vim-files/vim/bundle/vundle +++ b/vim-files/vim/bundle/vundle @@ -1 +1 @@ -Subproject commit 2d2690e41f875466b7de06f93e7ff93b8c50a9af +Subproject commit eb5ae19ad67c33565b18301fcdc2cf0fa7184522 diff --git a/vim-files/vimrc b/vim-files/vimrc index 3f45dff..7b1c3a5 100644 --- a/vim-files/vimrc +++ b/vim-files/vimrc @@ -34,7 +34,7 @@ Bundle 'maxbrunsfeld/vim-yankstack' Bundle 'tpope/vim-surround' Bundle 'scrooloose/syntastic' Bundle 'Valloric/YouCompleteMe' - +Bundle 'christoomey/vim-tmux-navigator' filetype plugin indent on " required """ end vundle @@ -214,12 +214,6 @@ map \q :q map \w :w noremap Q - -" Easy window navigation -map h -map j -map k -map l " Don’t reset cursor to start of line when moving around. set nostartofline " minimal number of lines to keep above/below cursorline