This seems to have petered out without a resolution. I believe I made a valid point below that the documentation and the behavior of matchparen are not in agreement. I would appreciate either acknowledgement that it's a bug and that it's been entered into the official bug db for future repair, or for someone to explain to me why I'm wrong, if you believe that's the case.
/Don ---------- Forwarded message ---------- From: Donald Allen <[email protected]> Date: Sat, Aug 27, 2011 at 11:52 AM Subject: Re: Lisp/Scheme paren matching To: [email protected] On Sat, Aug 27, 2011 at 11:44 AM, Donald Allen <[email protected]> wrote: > > > On Sat, Aug 27, 2011 at 11:23 AM, Sergey Khorev <[email protected]> > wrote: >> >> > I don't deny that a *lot* of effort went into documenting vim. But that >> > doesn't mean it can't be improved. >> >> Agreed. >> >> > I said as much in my previous message: "highlighting ought to work >> > correctly >> > without turning full syntax coloring on, which I'm guessing most would not >> > want on by default" (there was a typo in that phrase -- I typed 'more' when >> > I meant 'most'). >> > The more I think about this, the more convinced I am that there is an >> > obvious bug here: without syntax on, paren highlighting is on but does does >> > not work correctly in the case I've cited (though % does). >> >> The cause is simple: % is implemented in nv_percent function in Vim >> source and matchparen is a Vim plugin >> ($VIMRUNTIME/plugin/matchparen.vim) which relies on the names of >> syntax highlighting groups to skip over string literals etc. > > You seem to be saying, then, that matchparen depends on 'syntax on' to work > correctly, at least in this case and perhaps others? If that's true, then > matchparen ought to be disabled unless syntax is enabled, since it depends on > it, and the documentation ought to explain that clearly. The current > situation, where % does the right thing and highlighting does the wrong thing > with syntax disabled, is clearly wrong. >From :help matchparen: "The syntax highlighting attributes are used. When the cursor currently is not in a string or comment syntax item, then matches inside string and comment syntax items are ignored." The statement about matches inside strings appears to not to be consistent with what the code is doing. Furthermore, this bit of documentation says nothing about requiring that syntax be enabled. It simply says that "The syntax highlighting attributes are used." Perhaps that implies that syntax needs to be enabled, I don't know, but it certainly doesn't say it explicitly. And, in any case, the user should not be responsible for manually enabling syntax if matchparen requires it for correct operation and is enabled. > > /Don >> >> -- >> Sergey Khorev >> http://sites.google.com/site/khorser >> Can anybody think of a good tagline I can steal? >> >> -- >> You received this message from the "vim_dev" maillist. >> Do not top-post! Type your reply below the text you are replying to. >> For more information, visit http://www.vim.org/maillist.php > -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
