Created
November 22, 2013 14:18
-
-
Save suy/7600583 to your computer and use it in GitHub Desktop.
This file contains 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 characters
command! Gclose :call s:Gclose() | |
function! s:Gclose() abort | |
let previous_buffer = bufnr(expand("%")) | |
for buf in tabpagebuflist() | |
if getbufvar(buf, "fugitive_type") != '' | |
execute bufwinnr(buf).'wincmd w' | |
wincmd q | |
execute bufwinnr(previous_buffer).'wincmd w' | |
endif | |
endfor | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment