On Wed, 08 Apr 2009, Tim Chase wrote:
> Does this work for you?
>
> let cur=bufnr('%') | bufdo if bufnr('%') != cur | bd! | endif
Thanks it works, I prefer bw to bd.
On second thought, my requirement seemed faulty in that all buffers
except the current should already be written otherwise it can
not be switched, Is this correct?
If the current buffer has unsaved modification, Tim's function gives
warning and aborted. Why are such warning when it is supposed to delete
other_ buffers? Can this be improve>
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩161 溫庭筠 送人東遊
荒戍落黃葉 浩然離故關 高風漢陽渡 初日郢門山
江上幾人在 天涯孤棹還 何當重相見 樽酒慰離顏
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---