mengelbrecht/lightline-bufferline

Request: function to close current buffer

noib3 opened this issue · 1 comments

noib3 commented

I know there's the lightline#bufferline#delete(n) function to delete the n-th buffer, but it would be nice to have a function to close the current buffer, whatever its number may be.

Or equivalently, a function that returns the current buffer's ordinal number, which could then be used as lightline#bufferline#delete()'s argument.

@noib3 I created PR #73 which adds helper functions to convert to/from ordinal number and buffer number.

Can you use the built-in vim command bdelete for your use case to delete the current buffer?