Saturday, August 22, 2009

Re: goto line depending on exit code of filter

Hi,

bill lam wrote:
>
> I want to use an external program to filter the whole buffer. Upon
> exit of that filter and output written to current buffer, I want to
> goto a line position depending on exit code:
>
> 0 : goto the current line just before invoking filter
> +ve : error occurred, goto the line indicated by the error code.
>
> how to write a user command to do it assuming the filter is called
> with :%!foo

have a look at

:help v:shell_error

This variable holds the result of the last shell command.

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments: