On 2010-05-18, Tim Johnson <t...@johnsons-web.com> wrote: > Using vim 7.2 on slack 13.0 32-bit. > > Example: > : bdelete 54 > result > E516: No buffers were deleted > > How may I suppress the message above? > > Note: I have tried using 'silent', it doesn't > stop the message. > The goal is to use this in script. > As in > exe ":silent bdelete" i > or whatever is correct
:silent! bdelete 54 with an exclamation point seems to work. You could also use :if bufexists(54) | bdelete 54 | endif or put the bdelete command within a try block, but I haven't tried the latter. HTH, Gary -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php