Skip to content

Instantly share code, notes, and snippets.

@twymer
Created June 24, 2011 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twymer/1045445 to your computer and use it in GitHub Desktop.
Save twymer/1045445 to your computer and use it in GitHub Desktop.
Delete buffer but don't close screen split
function! s:closebufnotwindow(arg)
let bufnum = bufnr("%")
exe "enew"
exe "bd" . bufnum
endfunction
command! -nargs=* Bsnazzy call s:closebufnotwindow('<args>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment