How can I delete all open buffers with the MiniBufExplorer vim plugin?

606 views Asked by At

I'm using fholgado's fork of the MiniBufExplorer plugin with Vim 7.4. I'd like to setup a map in my .vimrc to delete/close all open buffers, but nothing I've tried has worked.

Examples:

nmap <leader>bda :MBEbd 1,1000<cr>
nmap <leader>bda :1,1000 MBEbd<cr>

From the plugin's documentation:

:MBEbd[!] [N1] [N2] ...                                               *:MBEbd*
    Delete buffers but preserve the window that holding them.
    [N*] is the buffer's number or name to be deleted. If no [N*] is given,
    then current buffer will be deleted. Multiple buffers could be deleted
    at the same time.

Any idea how I can accomplish this?

2

There are 2 answers

3
Amit On BEST ANSWER

I don't have the plugin but this works for me for deleting buffers in default vim.

nmap <leader>bda :bd <C-a><^M>

:bd - delete buffer

<C-a> - To autocomplete all matches

^M - Enter

0
Mauro On

Thanks Amit for your answer, I must change it in this way

nmap <leader>bda :bd <C-a> <CR>