moll / vim-bbye

Delete buffers and close files in Vim without closing your windows or messing up your layout. Like Bclose.vim, but rewritten and well maintained.
http://www.vim.org/scripts/script.php?script_id=4664
Other
654 stars 32 forks source link

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

Closed qiushihe closed 6 years ago

qiushihe commented 8 years ago

Hi,

I added two commands:

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

Thanks!

alexanderjeurissen commented 6 years ago

@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 commented 6 years ago

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. :)

croobat commented 2 years ago

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)