Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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

nmap <leader>bda :bd <C-a> <CR>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top