Re: delete buffers matching pattern

2006-07-19 Thread Benji Fisher
On Mon, Jul 17, 2006 at 10:59:41AM -0500, Tim Chase wrote: 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

Re: delete buffers matching pattern

2006-07-19 Thread Tim Chase
:bufdo if bufname(%)=~?'.exe$' | bdel | endif I think you want to escape the dot: :bufdo if bufname(%) =~? '\.exe$' | bdel | endif Oh, so correct. My error. It's one of those subtle things that works just fine until it bites you in the bum when one has file

delete buffers matching pattern

2006-07-17 Thread Wim R. Crols
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. I don't want to manually enumerate all

Re: delete buffers matching pattern

2006-07-17 Thread Tim Chase
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