Created
July 6, 2011 20:15
Revisions
-
skanev created this gist
Jul 6, 2011 .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,14 @@ command! CloseHiddenBuffers call s:CloseHiddenBuffers() function! s:CloseHiddenBuffers() let open_buffers = [] for i in range(tabpagenr('$')) call extend(open_buffers, tabpagebuflist(i + 1)) endfor for num in range(1, bufnr("$") + 1) if buflisted(num) && index(open_buffers, num) == -1 exec "bdelete ".num endif endfor endfunction