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

Re: matchit support for python

Expand Messages
  • Charles E. Campbell, Jr.
    ... With a function, highlighting can be used to help with figuring out what the matching pair is, too (see
    Message 1 of 11 , Sep 3, 2004
    • 0 Attachment
      Benji Fisher wrote:

      >
      >...Currently, the only
      >customization for different file types is that matchit.vim looks for a
      >list of regular expressions (usually defined in the ftplugin file) that
      >define matching pairs. I suppose the simplest thing to do would be to
      >look for a function like Matchit_python(); if the function exists and
      >returns a non-zero value, then use it to decide where to jump;
      >otherwise, continue as normal.
      >

      With a function, highlighting can be used to help with figuring out what
      the matching pair
      is, too (see http://vim.sourceforge.net/scripts/script.php?script_id=848
      for something related).

      Regards,
      Chip Campbell
    • Benji Fisher
      ... Yes, matchit already uses synID() and related functions in order to skip quotes( and //comments) . I guess I should not have written only in the bit
      Message 2 of 11 , Sep 6, 2004
      • 0 Attachment
        On Fri, Sep 03, 2004 at 11:42:14AM -0400, Charles E. Campbell, Jr. wrote:
        > Benji Fisher wrote:
        >
        > >
        > >...Currently, the only
        > >customization for different file types is that matchit.vim looks for a
        > >list of regular expressions (usually defined in the ftplugin file) that
        > >define matching pairs. I suppose the simplest thing to do would be to
        > >look for a function like Matchit_python(); if the function exists and
        > >returns a non-zero value, then use it to decide where to jump;
        > >otherwise, continue as normal.
        >
        > With a function, highlighting can be used to help with figuring out what
        > the matching pair
        > is, too (see http://vim.sourceforge.net/scripts/script.php?script_id=848
        > for something related).

        Yes, matchit already uses synID() and related functions in order to
        skip "quotes(" and //comments) . I guess I should not have written
        "only" in the bit quoted above.

        :help matchit-configure

        --Benji Fisher
      Your message has been successfully submitted and would be delivered to recipients shortly.