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

Matchit problem - Benji answer

Expand Messages
  • JAB@es-hamanngroup.com
    Message 1 of 1 , Jun 30, 2000
    • 0 Attachment
      > JAB@... wrote:
      > >
      > > Benji:
      > >
      > > On your 25/04/2000 email you say:
      > > :You keep ending up on the semicolons, right? I plan to
      > use
      > > the &
      > > :character, which would cause problems in search patterns
      > > anyway, so that
      > > :';\s*&else' will leave the cursor on the "e" and '<&tag>'
      > will
      > > leave the
      > > :cursor on the "t".
      > >
      > > : This should be much easier than implementing back
      > > references, but
      > > :there is still a good chance that I will introduce new
      > bugs,
      > > and besides
      > > :I have a day job. ;) I plan to write the documentation
      > next,
      > > while you
      > > :guys do beta testing for me, and then I'll get to this.
      > >
      > > I think it can solve the problem.
      > > Have you work on it?
      > >
      > > Thanks
      > > Jordi-Albert Batalla
      >
      > Jordi-Albert:
      >
      > I am not subscribed to vim-dev, so (1) I have only received the
      > e-mails that you cc'd to me and (2) I cannot post this reply to
      > vim-dev. You may forward it if you want.
      >
      > I think you have diagnosed the problem correctly. The script is
      > working properly (as documented, I think) given the setting of the
      > b:match_words variable. Do not overlook simple solutions. For example,
      > if your coding style is always to use "else" (not "el" or "els") and you
      > avoid using "|" to put more than one statement per line then you could
      > use
      >
      > let b:match_words=
      > \ '^\s*if\>,^\s*else\(if\)\=\>,^\s*endif\>:'
      >
      > There is a line in the script that avoids leaving the cursor on white
      > space, just for such situations.
      >
      > To answer your question, I have not done any work on matchit.vim
      > for about a month. I did make a few improvements, including "g%" for
      > backwards matching, as we discussed a while ago. I have not yet
      > implemented '&', though. I'll try to get to it within the next two
      > weeks, and I'll send announcement to the main vim mailing list when I
      > do.
      >
      > While we are on the subject, it will be much easier to implement
      > '&' with the restriction that it may not be used inside a \(group\). I
      > welcome comments on whether this is too restrictive or suggestions on
      > how to implement it without this restriction.
      >
      > --Benji Fisher
      >
      > You can get the beta version of matchit.vim from
      > http://sites.netscape.net/benjif/vim/
    Your message has been successfully submitted and would be delivered to recipients shortly.