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

vim 7 errors

Expand Messages
  • Paul van Erk
    Hi, I have weird matching pairs erros. It seems vim tries to match ; at the end of lines. The result is: Error detected while processing function
    Message 1 of 9 , Sep 5, 2006
    • 0 Attachment
      Hi,

      I have weird matching pairs erros. It seems vim tries to match ";" at the end
      of lines. The result is:

      Error detected while processing function <SNR>20_Highlight_Matching_Pair:
      line 38:
      E684: list index out of range: 11

      After that I have to <ESC> like mad to get out of the error.

      I tried searching for the location where it has a list of matchable
      characters, but I couldn't find it. Does anyone know what's wrong?

      Grts,
      Paul van Erk
      --
      Website: http://www.parena.net
      dbKalendar http://www.parena.net/dbKalendar
    • Bram Moolenaar
      ... What is the value of your matchpairs option? -- This is the polymorph virus! Follow these instructions carefully: 1. Send this message to everybody you
      Message 2 of 9 , Sep 5, 2006
      • 0 Attachment
        Paul van Erk wrote:

        > I have weird matching pairs erros. It seems vim tries to match ";" at the end
        > of lines. The result is:
        >
        > Error detected while processing function <SNR>20_Highlight_Matching_Pair:
        > line 38:
        > E684: list index out of range: 11
        >
        > After that I have to <ESC> like mad to get out of the error.
        >
        > I tried searching for the location where it has a list of matchable
        > characters, but I couldn't find it. Does anyone know what's wrong?

        What is the value of your 'matchpairs' option?

        --
        This is the polymorph virus! Follow these instructions carefully:
        1. Send this message to everybody you know.
        2. Format your harddisk.
        Thank you for your cooperation in spreading the most powerful virus ever!

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
      • A.J.Mechelynck
        ... 20_ means a function defined with s: or in the 20th sourced script, as shown by :scriptnames . I guess it might be the matchparen plugin. What
        Message 3 of 9 , Sep 5, 2006
        • 0 Attachment
          Paul van Erk wrote:
          > Hi,
          >
          > I have weird matching pairs erros. It seems vim tries to match ";" at the end
          > of lines. The result is:
          >
          > Error detected while processing function <SNR>20_Highlight_Matching_Pair:
          > line 38:
          > E684: list index out of range: 11
          >
          > After that I have to <ESC> like mad to get out of the error.
          >
          > I tried searching for the location where it has a list of matchable
          > characters, but I couldn't find it. Does anyone know what's wrong?
          >
          > Grts,
          > Paul van Erk

          <SNR>20_ means a function defined with s: or <SID> in the 20th sourced
          script, as shown by ":scriptnames". I guess it might be the matchparen
          plugin.

          What is your 'matchpairs' option set to? It should contain
          comma-separated pairs of colon-separated single characters, by default
          (:),[:],{:}

          I suspect you may have mistyped the example for matching equal signs to
          semicolons mentioned at ":help 'matchpairs'": in

          :set matchpairs+==:;

          there should be a plus sign, _two_ equal signs, a colon and a semicolon.
          Also, the example given (at line 4398 of options.txt for Vim 7.0 dated
          2006 Aug 09) ought to have "setlocal" rather than "set", as follows:

          :au FileType c,cpp,java setl mps+==:;
          ^

          in order to avoid clobbering the global default value for non-C non-C++
          non-Java files.


          Best regards,
          Tony.
        • Paul van Erk
          More info; I found this in my .(g)vimrc : set matchpairs+=?::,=:; so that s: PLUS EQUALS QUESTION_MARK COLON COLON COMMA EQUALS COLON SEMICOLON It s been in
          Message 4 of 9 , Sep 5, 2006
          • 0 Attachment
            More info; I found this in my .(g)vimrc :

            set matchpairs+=?::,=:;

            so that's: PLUS EQUALS QUESTION_MARK COLON COLON COMMA EQUALS COLON SEMICOLON

            It's been in there for ages (checked some backups and I've had my rc file for
            2 years or so, I think) and never gave me any problems. Does anyone know what
            it's supposed to do and what the syntax should be? For now I'll comment it
            out, so the errors are gone.

            Grts,
            Paul

            On Tuesday 05 September 2006 23:33, A.J.Mechelynck wrote:
            > Paul van Erk wrote:
            > > Hi,
            > >
            > > I have weird matching pairs erros. It seems vim tries to match ";" at the
            > > end of lines. The result is:
            > >
            > > Error detected while processing function <SNR>20_Highlight_Matching_Pair:
            > > line 38:
            > > E684: list index out of range: 11
            > >
            > > After that I have to <ESC> like mad to get out of the error.
            > >
            > > I tried searching for the location where it has a list of matchable
            > > characters, but I couldn't find it. Does anyone know what's wrong?
            > >
            > > Grts,
            > > Paul van Erk
            >
            > <SNR>20_ means a function defined with s: or <SID> in the 20th sourced
            > script, as shown by ":scriptnames". I guess it might be the matchparen
            > plugin.
            >
            > What is your 'matchpairs' option set to? It should contain
            > comma-separated pairs of colon-separated single characters, by default
            > (:),[:],{:}
            >
            > I suspect you may have mistyped the example for matching equal signs to
            > semicolons mentioned at ":help 'matchpairs'": in
            >
            > :set matchpairs+==:;
            >
            > there should be a plus sign, _two_ equal signs, a colon and a semicolon.
            > Also, the example given (at line 4398 of options.txt for Vim 7.0 dated
            >
            > 2006 Aug 09) ought to have "setlocal" rather than "set", as follows:
            > :au FileType c,cpp,java setl mps+==:;
            >
            > ^
            >
            > in order to avoid clobbering the global default value for non-C non-C++
            > non-Java files.
            >
            >
            > Best regards,
            > Tony.

            --
            Website: http://www.parena.net
            dbKalendar http://www.parena.net/dbKalendar
          • Benji Fisher
            ... The matchpairs option controls how % finds matching characters. Just as ( and ) are paired, your setting pairs ? with : and = with ; . The matchparen
            Message 5 of 9 , Sep 5, 2006
            • 0 Attachment
              On Wed, Sep 06, 2006 at 01:03:04AM +0200, Paul van Erk wrote:
              > More info; I found this in my .(g)vimrc :
              >
              > set matchpairs+=?::,=:;
              >
              > so that's: PLUS EQUALS QUESTION_MARK COLON COLON COMMA EQUALS COLON SEMICOLON
              >
              > It's been in there for ages (checked some backups and I've had my rc file for
              > 2 years or so, I think) and never gave me any problems. Does anyone know what
              > it's supposed to do and what the syntax should be? For now I'll comment it
              > out, so the errors are gone.
              >
              > Grts,
              > Paul

              The 'matchpairs' option controls how % finds matching characters.
              Just as ( and ) are paired, your setting pairs ? with : and = with ; .
              The matchparen plugin uses the 'matchpairs' option as well. For more
              details,

              :help 'matchpairs'

              HTH --Benji Fisher
            • A.J.Mechelynck
              ... It s supposed to treat ? and : on the one hand, and = and ; on the other hand, as paired brackets . However, the matchparen plugin uses a rather
              Message 6 of 9 , Sep 5, 2006
              • 0 Attachment
                Paul van Erk wrote:
                > More info; I found this in my .(g)vimrc :
                >
                > set matchpairs+=?::,=:;
                >
                > so that's: PLUS EQUALS QUESTION_MARK COLON COLON COMMA EQUALS COLON SEMICOLON
                >
                > It's been in there for ages (checked some backups and I've had my rc file for
                > 2 years or so, I think) and never gave me any problems. Does anyone know what
                > it's supposed to do and what the syntax should be? For now I'll comment it
                > out, so the errors are gone.
                >
                > Grts,
                > Paul

                It's supposed to treat ? and : on the one hand, and = and ; on the other
                hand, as "paired brackets". However, the matchparen plugin uses a rather
                elementary algorithm to split 'matchpairs' into individual items: any
                colons and commas are regarded as delimiters, and then odd "parts" are
                treated as "left brackets", even ones as "right brackets".

                I see the following possible cures, use only one of them:
                (a) disable matchparen matching

                :set loaded_matchparen = 1

                (b) remove the questionable pair "?::" from the 'matchpairs' options

                (c) patch plugin/matchparen.vim to refine the splitting algorithm, so
                that a colon should be treated as either a separator or a "bracket"
                depending on position within the option.


                Best regards,
                Tony.
              • Benji Fisher
                ... Good catch. I think the line you are referring to is let plist = split(&matchpairs, : |, ) in $VIMRUNTIME/plugin/matchparen.vim . ... Now that the
                Message 7 of 9 , Sep 5, 2006
                • 0 Attachment
                  On Wed, Sep 06, 2006 at 01:20:13AM +0200, A.J.Mechelynck wrote:
                  >
                  > It's supposed to treat ? and : on the one hand, and = and ; on the other
                  > hand, as "paired brackets". However, the matchparen plugin uses a rather
                  > elementary algorithm to split 'matchpairs' into individual items: any
                  > colons and commas are regarded as delimiters, and then odd "parts" are
                  > treated as "left brackets", even ones as "right brackets".

                  Good catch. I think the line you are referring to is

                  let plist = split(&matchpairs, ':\|,')

                  in $VIMRUNTIME/plugin/matchparen.vim .

                  > I see the following possible cures, use only one of them:
                  > (a) disable matchparen matching
                  >
                  > :set loaded_matchparen = 1
                  >
                  > (b) remove the questionable pair "?::" from the 'matchpairs' options
                  >
                  > (c) patch plugin/matchparen.vim to refine the splitting algorithm, so
                  > that a colon should be treated as either a separator or a "bracket"
                  > depending on position within the option.

                  Now that the problem has been pointed out, I think the patch should
                  be made in the official distribution. How about (simple but oh, so
                  clever)

                  let plist = split(&matchpairs, '.\zs.')

                  which removes every second character? Will that have trouble with
                  multibyte characters? Are these even allowed in 'matchpairs'?

                  HTH --Benji Fisher

                  P.S. cc'ed to vim-dev for further discussion
                • Yakov Lerner
                  ... Maybe the plugin shall be fixed to treat : and , as potential parens in &matchpairs, but unescaped : and , as separators. It is thinkable that , be
                  Message 8 of 9 , Sep 5, 2006
                  • 0 Attachment
                    On 9/5/06, A.J.Mechelynck <antoine.mechelynck@...> wrote:
                    > Paul van Erk wrote:
                    > > More info; I found this in my .(g)vimrc :
                    > >
                    > > set matchpairs+=?::,=:;
                    > >
                    > > so that's: PLUS EQUALS QUESTION_MARK COLON COLON COMMA EQUALS COLON SEMICOLON
                    >
                    > It's supposed to treat ? and : on the one hand, and = and ; on the other
                    > hand, as "paired brackets". However, the matchparen plugin uses a rather
                    > elementary algorithm to split 'matchpairs' into individual items: any
                    > colons and commas are regarded as delimiters, and then odd "parts" are
                    > treated as "left brackets", even ones as "right brackets".

                    Maybe the plugin shall be fixed to treat \: and \, as potential parens
                    in &matchpairs, but unescaped ':' and ',' as separators.

                    It is thinkable that ',' be used as paren, also, in some language or text.

                    Yakov
                  • Bram Moolenaar
                    ... OK, now I can reproduce it. This patch will fix the problem: ... *************** *** 44,50 **** let before = 0 let c = getline(c_lnum)[c_col - 1] ! let
                    Message 9 of 9 , Sep 6, 2006
                    • 0 Attachment
                      Paul van Erk wrote:

                      > More info; I found this in my .(g)vimrc :
                      >
                      > set matchpairs+=?::,=:;
                      >
                      > so that's: PLUS EQUALS QUESTION_MARK COLON COLON COMMA EQUALS COLON SEMICOLON
                      >
                      > It's been in there for ages (checked some backups and I've had my rc
                      > file for 2 years or so, I think) and never gave me any problems. Does
                      > anyone know what it's supposed to do and what the syntax should be?
                      > For now I'll comment it out, so the errors are gone.

                      OK, now I can reproduce it. This patch will fix the problem:

                      *** ../vim-7.0.090/runtime/plugin/matchparen.vim Tue Aug 8 18:08:54 2006
                      --- runtime/plugin/matchparen.vim Wed Sep 6 20:43:30 2006
                      ***************
                      *** 44,50 ****
                      let before = 0

                      let c = getline(c_lnum)[c_col - 1]
                      ! let plist = split(&matchpairs, ':\|,')
                      let i = index(plist, c)
                      if i < 0
                      " not found, in Insert mode try character before the cursor
                      --- 44,50 ----
                      let before = 0

                      let c = getline(c_lnum)[c_col - 1]
                      ! let plist = split(&matchpairs, '.\zs\([:,]\|$\)')
                      let i = index(plist, c)
                      if i < 0
                      " not found, in Insert mode try character before the cursor

                      --
                      GUARD #2: It could be carried by an African swallow!
                      GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow,
                      that's my point.
                      GUARD #2: Oh, yeah, I agree with that...
                      The Quest for the Holy Grail (Monty Python)

                      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                      \\\ download, build and distribute -- http://www.A-A-P.org ///
                      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
                    Your message has been successfully submitted and would be delivered to recipients shortly.