Saturday, August 22, 2009

goto line depending on exit code of filter

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

Thanks in advance.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

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

No comments: