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

suppress error?

Expand Messages
  • Bee
    This function and its friend PrevDQ() work. If I am diffing goes to next change, or if doing helpgrep will go to the next. When at the end of the helpgrep, it
    Message 1 of 3 , Nov 30, 2011
    • 0 Attachment
      This function and its friend PrevDQ() work.

      If I am diffing goes to next change, or if doing helpgrep will go to
      the next.

      When at the end of the helpgrep, it presents:
      Error detected while processing function NextDQ:
      line 4:
      E553: No more items
      Press ENTER or type command to continue

      Can I suppress that message completely?

      function! NextDQ()
      if &diff
      normal! ]c
      else
      cn
      if v:version >= 700
      setlocal cursorline
      endif
      endif
      endfun
      nmap <F8> :call NextDQ()<cr>

      -Bill

      --
      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
    • Christian Brabandt
      ... regards, Christian -- 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
      Message 2 of 3 , Dec 1, 2011
      • 0 Attachment
        On Thu, December 1, 2011 8:57 am, Bee wrote:
        > This function and its friend PrevDQ() work.
        >
        > If I am diffing goes to next change, or if doing helpgrep will go to
        > the next.
        >
        > When at the end of the helpgrep, it presents:
        > Error detected while processing function NextDQ:
        > line 4:
        > E553: No more items
        > Press ENTER or type command to continue
        >
        > Can I suppress that message completely?
        >
        > function! NextDQ()
        > if &diff
        > normal! ]c
        > else
        > cn
        > if v:version >= 700
        > setlocal cursorline
        > endif
        > endif
        > endfun
        > nmap <F8> :call NextDQ()<cr>
        >

        :h sil

        regards,
        Christian

        --
        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
      • Bee
        ... Thank you Christian. Not quite what I was looking for. But this is: function! CurLin() if v:version = 700 | setlocal cursorline else | normal! zz endif
        Message 3 of 3 , Dec 1, 2011
        • 0 Attachment
          On Dec 1, 12:01 am, "Christian Brabandt" <cbli...@...> wrote:
          > On Thu, December 1, 2011 8:57 am, Bee wrote:
          > > This function and its friend PrevDQ() work.
          >
          > > If I am diffing goes to next change, or if doing helpgrep will go to
          > > the next.
          >
          > > When at the end of the helpgrep, it presents:
          > > Error detected while processing function NextDQ:
          > > line    4:
          > > E553: No more items
          > > Press ENTER or type command to continue
          >
          > > Can I suppress that message completely?
          >
          > >   function! NextDQ()
          > >     if &diff
          > >       normal! ]c
          > >     else
          > >       cn
          > >       if v:version >= 700
          > >         setlocal cursorline
          > >       endif
          > >     endif
          > >   endfun
          > >   nmap <F8> :call NextDQ()<cr>
          >
          > :h sil
          >
          > regards,
          > Christian

          Thank you Christian.
          Not quite what I was looking for.
          But this is:

          function! CurLin()
          if v:version >= 700 | setlocal cursorline
          else | normal! zz
          endif
          endfun

          function! PrevDQ() " Prev Diff or Quickfix
          if &diff
          normal! [c
          else
          try | cN
          catch | clast
          endtry | call CurLin()
          endif
          endfun
          nmap <silent> <F7> :call PrevDQ()<cr>

          function! NextDQ() " Next Diff or Quickfix
          if &diff
          normal! ]c
          else
          try | cn
          catch | cfirst
          endtry | call CurLin()
          endif
          endfun
          nmap <silent> <F8> :call NextDQ()<cr>

          -Bill

          --
          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
        Your message has been successfully submitted and would be delivered to recipients shortly.