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

Re: Fwd: navigating code blocks in Oracle PLSQL

Expand Messages
  • Benji Fisher
    ... This is a bug in ftplugin/sql.vim . Try replacing with %( and it should work. If you have installed the docs for
    Message 1 of 4 , Mar 3, 2004
    • 0 Attachment
      On Tue, Mar 02, 2004 at 08:10:02PM -0800, lolli lolli wrote:
      > Thanks a lot Benji Fisher. I'm now able to use matchit.vim from ftplugin.
      > '%' works fine, but only for simple IF...ELSE...END IF, Loops etc. It
      > is not working for nested IF conditions or Loops. Is this a known
      > issue?
      >
      > rgds,
      > Uday

      This is a bug in ftplugin/sql.vim . Try replacing '\<if\>' with
      '\%(\<end\s\+\)\@<!\<if\>' and it should work. If you have installed
      the docs for matchit.vim, then this is explained under

      :help matchit-spaces

      I think the maintainer of ftplugin/sql.vim reads this list, but I
      will cc him anyway. If there is already an updated version of the file
      out there, I apologize.

      HTH --Benji Fisher

      P.S. Now that I look at it more closely, I see that the correct
      patternis in there, but also the incorrect one is there. The two lines

      \ '\<if\>:\<elsif\>:\<elseif\>:\<else\>:'.
      \ '\%(\<end\s\+\)\@<!' . '\<if\>:\<end\s\+if\>,'.

      should read

      \ '\%(\<end\s\+\)\@<!' . '\<if\>:'.
      \ '\<elsif\>:\<elseif\>:\<else\>:\<end\s\+if\>,'.

      (untested).
    • David Fishburn
      ... I have corrected the ftplugin and uploaded a new version: http://www.vim.org/scripts/script.php?script_id=454 I had added support for macro definitions
      Message 2 of 4 , Mar 3, 2004
      • 0 Attachment
        > I think the maintainer of ftplugin/sql.vim reads this
        > list, but I will cc him anyway. If there is already an
        > updated version of the file out there, I apologize.

        I have corrected the ftplugin and uploaded a new version:
        http://www.vim.org/scripts/script.php?script_id=454

        I had added support for macro definitions (see :h [d ), but realized I had
        never uploaded that version.

        So that is in there now as well.

        Try using [d when on a variable in a stored procedure.
        If you encounter issues, let me know and I will upate the file.
        I don't normally use Oracle, so the syntax is slightly different.

        Thanks for the change Benji, my simple testing showed they worked.

        Dave
      Your message has been successfully submitted and would be delivered to recipients shortly.