From d4c48bcf83011898a203fd18bfed34f67918fb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=A4gele?= Date: Fri, 28 Jun 2013 03:08:16 +0200 Subject: [PATCH] again, split movement --- vimrc | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/vimrc b/vimrc index cb79856..c20c8be 100644 --- a/vimrc +++ b/vimrc @@ -159,36 +159,6 @@ if iCanHazVundle == 0 endif "" }}} -"#################################################################### -" switch vim splits with the same keys as tmux panes. {{{ -" Credit to https://github.com/aaronjensen -"#################################################################### -if exists('$TMUX') - function! TmuxOrSplitSwitch(wincmd, tmuxdir) - let previous_winnr = winnr() - execute "wincmd " . a:wincmd - if previous_winnr == winnr() - " The sleep and & gives time to get back to vim so tmux's focus tracking - " can kick in and send us our ^[[O - execute "silent !sh -c 'sleep 0.01; tmux select-pane -" . a:tmuxdir . "' &" - redraw! - endif - endfunction - let previous_title = substitute(system("tmux display-message -p '#{pane_title}'"), '\n', '', '') - let &t_ti = "\]2;vim\\\" . &t_ti - let &t_te = "\]2;". previous_title . "\\\" . &t_te - nnoremap :call TmuxOrSplitSwitch('h', 'L') - nnoremap :call TmuxOrSplitSwitch('j', 'D') - nnoremap :call TmuxOrSplitSwitch('k', 'U') - nnoremap :call TmuxOrSplitSwitch('l', 'R') -else - map h - map j - map k - map l -endif -"" }}} - "#################################################################### " bundles and their options {{{ "####################################################################