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

Re: How do I block the message "Pattern not found" in :s

Expand Messages
  • James Kanze
    ... Thanks. That s what I was looking for. -- James -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
    Message 1 of 3 , Mar 12, 2013
    View Source
    • 0 Attachment
      On Tuesday, 12 March 2013 15:39:16 UTC, Tim Chase wrote:
      > On 2013-03-12 08:30, James Kanze wrote:
      > > function! FixParen()
      > > s/( */( /g
      > > s/ *)/ )/g
      > > s/( *)/()/g
      > > endfunction

      > > The problem is that when calling these over a range (the usual
      > > procedure), vim invokes the function once per line; a lot of lines
      > > don't have anything which needs fixing, and cause the message
      > > "Pattern not found" to be emitted. Is there any way of inhibiting
      > > this?

      > You can use the "e" flag to suppress this:

      > s/( */( /ge

      > which you can read about at

      > :help :s_flags

      Thanks. That's what I was looking for.

      --
      James

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.