On 2009-11-25, frank wang wrote:
> Hi,
>
> I am writing a vim script and I need to know whether the tag search
> failed or not. Does anyone know how to do it? For example, after
> execution
>
> exe "tag " . searchsymbol
>
> How do i know it fails to find the tag symbol?
You could test the value of v:errmsg. See
:help v:errmsg
for an example. Alternatively, you could use a try block. See
:help exception-handling
HTH,
Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---