How to delete multiple buffers in Vim?
You also can use alternatively use:
:.,$-bd[elete] " to delete buffers from the current one to last but one
:%bd[elete] " to delete all buffers
You can use <C-a>
to complete all matches. So if you type :bd *.xml
and then hit <C-a>
, vim will complete the command to :bd file1.xml file2.xml file3.xml
.
:3,5bd[elete]
Will delete buffer range from 3 to 5 .