-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 20-Nov-2014 15:03, Daniel Hahler wrote:
> Is it possible to source a file (without using `:silent!`), but
> ignore any of the following errors: - E122: Function Foo already
> exists, add ! to replace it - E174: Command already exists: add !
> to replace it - E227: mapping already exists for ...
>
> Using "silent!" also suppresses any output.
>
> I've tried to remove the "silent!" by using a try/catch block, but
> that aborts the sourcing -
> https://github.com/Shougo/neobundle.vim/pull/342/files (the
> revert).
>
> `:source!` (with a bang) has a different meaning already, and it
> would be nice to use an already existing mechanism.
I think the answer is already contained in your title: That's what the
:unsilent command was created for.
:silent! unsilent source {file}
This suppresses the mentioned errors (tested with E122), but keeps any
:echo output visible.
- -- regards, ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
iQEcBAEBAgAGBQJUbf6/AAoJEA7ziXlAzQ/vId8H+wVS+4YEDomyyNZSdfbhaAMp
HY683DRyaXRvcEC21vvVdxmIVF3lPlOv0G2Ib4SjHrHrHGcdo7RG+mal+I1NtOpg
DErcUFnjmIijRvYYtUyauGBuJSBMhaCq3kjIxjicGhCEuwSj9Zxl0WLGBFt6GWB2
Lf6uArNIh//EElBZ3QE94wMPO5pfaJtwS4vl68goJyfIzXa4dev1V1TBrfV2taxG
DitcIJMZx0hNjjbdKOkiUR9dkTeyVyrK7A955BNWKVihpVEe4hEHPJbye1DPJzla
E/998YDCfWEL2tx+N8U5tnBcn2g0/xa8s4QJbFpj7VwYpVTd/Y1bcB0ON92be+E=
=/ORM
-----END PGP SIGNATURE-----
--
--
You received this message from the "vim_dev" 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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.