diff --git a/.vimrc b/.vimrc index 7cc6c81..9fc03bf 100644 --- a/.vimrc +++ b/.vimrc @@ -311,51 +311,3 @@ function! RunTests(filename) end endfunction -" From http://vim.wikia.com/wiki/Move_current_window_between_tabs -" Moves a window from one tab to another. -function! MoveToPrevTab() - "there is only one window - if tabpagenr('$') == 1 && winnr('$') == 1 - return - endif - "preparing new window - let l:tab_nr = tabpagenr('$') - let l:cur_buf = bufnr('%') - if tabpagenr() != 1 - close! - if l:tab_nr == tabpagenr('$') - tabprev - endif - sp - else - close! - exe "0tabnew" - endif - "opening current buffer in new window - exe "b".l:cur_buf -endfunction - -function! MoveToNextTab() - "there is only one window - if tabpagenr('$') == 1 && winnr('$') == 1 - return - endif - "preparing new window - let l:tab_nr = tabpagenr('$') - let l:cur_buf = bufnr('%') - if tabpagenr() < tab_nr - close! - if l:tab_nr == tabpagenr('$') - tabnext - endif - sp - else - close! - tabnew - endif - "opening current buffer in new window - exe "b".l:cur_buf -endfunction -map :call MoveToNextTab()H -map :call MoveToPrevTab()H -