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

Re: controlling vim's exit status

Expand Messages
  • Peter Stone
    Ah - excellent. Works like a charm. Thanks! On Jun 2, 6:11 pm, Tony Mechelynck ...
    Message 1 of 4 , Jun 3, 2008
    • 0 Attachment
      Ah - excellent. Works like a charm.

      Thanks!

      On Jun 2, 6:11 pm, Tony Mechelynck <antoine.mechely...@...>
      wrote:
      > On 02/06/08 21:56, Peter Stone wrote:
      >
      > > Is there any way to control vim's exit code?
      >
      > > I'm using a script that looks something like:
      >
      > > vim /some/config/file&&  reload config
      >
      > > and I'd like to be able to prevent the "reload config" by exiting vim
      > > with a non-zero status.
      >
      > > I think subversion achieves this type of conditional behavior (i.e.,
      > > on checkin) by checking whether the file was changed - do I need to go
      > > that route, or is there a command like :exit(1) ?
      >
      > > Thanks,
      > > -Peter Stone
      >
      >         :help :cquit
      >
      > -- I didn't know about it; I found it by using
      >
      >         :helpgrep \<exit\>
      >
      > then repeatedly hitting F2, which my vimrc maps as follows
      >
      >         :map <F2> :cnext<CR>
      >         :map <S-F2> :cprev<CR>
      >
      > Best regards,
      > Tony.
      > --
      > If you live to the age of a hundred you have it made because very few
      > people die past the age of a hundred.
      >                 -- George Burns
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.