Revisions
-
eagletmt revised this gist
Apr 7, 2010 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,22 @@ " A .vimrc snippet that allows you to move around windows beyond tabs nnoremap <silent> <Tab> :<C-u>call <SID>NextWindowOrTab()<CR> nnoremap <silent> <S-Tab> :<C-u>call <SID>PreviousWindowOrTab()<CR> function! s:NextWindowOrTab() if winnr() < winnr("$") wincmd w else tabnext 1wincmd w endif endfunction function! s:PreviousWindowOrTab() if winnr() > 1 wincmd W else tabprevious execute winnr("$") . "wincmd w" endif endfunction -
uasi created this gist
Apr 7, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ " A .vimrc snippet that allows you to move around windows beyond tabs nnoremap <Tab> :call NextWindowOrTab()<CR>:echo<CR> nnoremap <S-Tab> :call PreviousWindowOrTab()<CR>:echo<CR> function! NextWindowOrTab() if winnr() < winnr("$") execute "normal \<C-W>\<C-W>" else tabnext execute "normal 1\<C-W>\<C-W>" endif endfunction function! PreviousWindowOrTab() if winnr() > 1 execute "normal \<C-W>\<S-W>" else tabprevious execute "normal " . winnr("$") . "\<C-W>\<C-W>" endif endfunction