On Thu, 09 Apr 2009, Tony Mechelynck wrote:
> The following (untested) does it without changing buffers:
>
> function ClearBuffers(wipeout)
> " usage:
> " call ClearBuffers(0) to delete all buffers except the current one
> " call ClearBuffers(1) to wipe them out
> let i=1
> while i <= bufnr("$")
> if bufexists(i) && i != bufnr("")
> exe (a:wipeout? "bwipeout!" : "bdelete!") i
> endif
> let i += 1
> endwhile
> endfunction
Hi Tony,
I tested it ok. However could it be further modified to make it
delete only listed buffers, ie. leaved unlisted buffers untouched.
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩020 孟浩然 宿業師山房待丁大不至
夕陽度西嶺 群壑倏已暝 松月生夜涼 風泉滿清聽
樵人歸欲盡 煙鳥棲初定 之子期宿來 孤琴候蘿徑
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---