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

Bug with %? (Vim 6.3, Vim 7.0aa)

Expand Messages
  • Mikolaj Machowski
    Hello, This issue was reported by Jusuf AT gmx DOT com with 6.3 I can reproduce this on Vim 7.0aa: 1. In this case with cursor on { after % cursor jumps to
    Message 1 of 2 , Dec 31, 2004
    • 0 Attachment
      Hello,

      This issue was reported by Jusuf AT gmx DOT com with 6.3
      I can reproduce this on Vim 7.0aa:

      1.
      In this case with cursor on { after % cursor jumps
      to first } (inside comment):
      void foo()
      {
      /* } */
      }

      2.
      Here works correctly:
      void foo()
      {
      string s = " } ";
      }

      m.

      --
      LaTeX + Vim = http://vim-latex.sourceforge.net/
      Vim-list(s) Users Map: (last change 6 Oct)
      http://skawina.eu.org/mikolaj/vimlist
      CLEWN - http://clewn.sf.net
    • Bram Moolenaar
      ... This is intentional. I sometimes use a } in comments to balance a { in an #ifdef. Note that the % flag in cpoptions changes how it works for strings.
      Message 2 of 2 , Dec 31, 2004
      • 0 Attachment
        Mikolaj Machowski wrote:

        > This issue was reported by Jusuf AT gmx DOT com with 6.3
        > I can reproduce this on Vim 7.0aa:
        >
        > 1.
        > In this case with cursor on { after % cursor jumps
        > to first } (inside comment):
        > void foo()
        > {
        > /* } */
        > }
        >
        > 2.
        > Here works correctly:
        > void foo()
        > {
        > string s = " } ";
        > }

        This is intentional. I sometimes use a } in comments to balance a { in
        an #ifdef.

        Note that the '%' flag in 'cpoptions' changes how it works for strings.

        If you use the matchit plugin you can configure how it works.

        --
        Some of the well know MS-Windows errors:
        ESLEEP Operator fell asleep
        ENOERR No error yet
        EDOLLAR OS too expensive
        EWINDOWS MS-Windows loaded, system in danger

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
      Your message has been successfully submitted and would be delivered to recipients shortly.