Wednesday, March 23, 2022

Re: '%' matches but it doesn't when executed

Adri Verhoef <a3@a3.xs4all.nl> wrote:
> Hi, I've been using Vi and Vim since the eighties. My current Vim
> version is 8.2.4579, provided by Fedora Linux.
>
> I have this line in a file:
> <a href="[^"]+_trk([^"]+)">
>
> When the cursor is on the first or second [, then the matching ] lights up.
> When the cursor is on the first [ and I type %, the cursor jumps to the
> second ].
> When the cursor is on the (, the ) lights up.
> When the cursor is on the ( and I type %, nothing happens.
> When the cursor is on the underscore _ and I type %, nothing happens.

I suppose you know about the M and % compatibility options?

:help cpo-M
:help cpo-%

It sounds like the matchparen plugin is showing you a "match" without
properly taking the cpoptions setting into account or is being confused
by the syntax highlighting guess of content type. Personally I find
matchparen and showmatch highly distracting and don't use them. Maybe
you'd enjoy that, too.

For the plugin:

:help pi_paren.txt

Elijah
------
will spare you the parse html-with-regexp comments

--
--
You received this message from the "vim_use" 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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/4KP5Ws60s1zfYm%40panix5.panix.com.

No comments:

Post a Comment