Skip to content

Instantly share code, notes, and snippets.

@Juszczak
Created September 7, 2017 14:55
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 Juszczak/c8bdfa5e6d31553aef647d9878610662 to your computer and use it in GitHub Desktop.
Save Juszczak/c8bdfa5e6d31553aef647d9878610662 to your computer and use it in GitHub Desktop.
Returns number of buffers in Vim
function! GetBuffersNumber()
return len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment