Is there a way to delete all buffers matching a certain pattern?For example, suppose I just read in all files in a directory and this is my buffer list:1 "a.txt" 2 "b.txt" 3 "1.exe" 4 "2.exe" 5 "c.txt" 6 "3.exe" 7 "d.txt"I want to do something like ":bdelete *.exe".
The following seems to do the trick for me:
:bufdo if bufname("%")=~'.exe$' | bdel | endif
or its case-insensitive cousin
:bufdo if bufname("%")=~?'.exe$' | bdel | endif
HTH,
-tim
