On May 18, 5:33 pm, Gary Johnson <[email protected]> wrote: > On 2010-05-18, Tim Johnson <[email protected]> wrote: > > > 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. >
The reason for this is given at :help :silent. Without the !, it only ignores "normal" messages. With the !, it skips error messages as well. In general, by default, Vim will show you all error messages, stopping mappings and macros in their tracks. -- 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
