Skip to content

Add commands for deleting all buffers and deleting all but one buffer#4

Closed
qiushihe wants to merge 3 commits intomoll:masterfrom
qiushihe:master
Closed

Add commands for deleting all buffers and deleting all but one buffer#4
qiushihe wants to merge 3 commits intomoll:masterfrom
qiushihe:master

Conversation

@qiushihe
Copy link
Copy Markdown

Hi,

I added two commands:

  • Bdeleteall which deletes all buffers; and ...
  • Bdeleteexcept which deletes all but one buffer (defaults to the current buffer)

I've been using this for a while now and it seems fairly stable. So please consider merging this :D

Thanks!

@alexanderjeurissen
Copy link
Copy Markdown

@qiushihe @moll I don't think there is use for the Bdeleteall command seeing as that can already be achieved using :bufdo :Bdelete (as specified in the readme) and deleting all buffers that are currently hidden can be achieved with (https://github.com/arithran/vim-delete-hidden-buffers)

@moll
Copy link
Copy Markdown
Owner

moll commented Mar 3, 2018

Thanks, @qiushihe, for sharing your code! I'm not yet sure if this should belong in Bbye.vim, but I've mentioned your script in the README to at least people with similar wishes can still copy it over to their config files. :)

@moll moll closed this Mar 3, 2018
@croobat
Copy link
Copy Markdown

croobat commented Jul 4, 2022

Hey, sorry I don't know if I can PR a closed PR but at least can leave a comment for future reference, for the function to work you gotta add "bdelete" to the bdelete function arguments called around line 21, as in:

call s:bdelete("bdelete", a:bang, buffer_nr)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants