Loading ...
Sorry, an error occurred while loading the content.

107018Re: goto line depending on exit code of filter

Expand Messages
  • Tony Mechelynck
    Sep 1, 2009
      On 01/09/09 12:18, bill lam wrote:
      > On Tue, 01 Sep 2009, Tony Mechelynck wrote:
      >> external program generate the required number as a return code: IIRC,
      >> return codes are limited to one byte, and those above 127 may have a
      >> special meaning (generated by the OS maybe).
      > Tony, you are correct. I don't why it seemed to work last time I
      > tested.
      > How can I store content of the current buffer and restore it in case
      > of error? like the following pseudo code
      > let tmp=%
      > %!filter
      > if v:xhell_error | set %=tmp | endif

      what about (untested)

      if v:shell_error


      If it doesn't work you can always do

      w! /temp/file
      if v:shell_error
      e! /temp/file
      saveas #

      but it isn't very elegant.

      Best regards,
      President Reagan has noted that there are too many economic pundits and
      forecasters and has decided on an excess prophets tax.

      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 11 messages in this topic