On 24/03/2022 01:22, Eli the Bearded wrote:
Adri Verhoef <[email protected]> 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.
I suppose you know about the M and % compatibility options?
:help cpo-M
:help cpo-%
I did read that before posting, yes.
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.
Actually, I've never found it too distracting, so never thought of
turning it off.
Still, Vim shows one thing and does the other. That is not logical.
Is that because the old Vi (behaviour) does the wrong thing?
Because if I do in Vim:
se cpoptions=aABceFs (this is my default, apparently)
se cpoptions+=%
... then it works as expected, i.e. logically. WYSIWYG. :-)
And when I do
vim -u NONE "+se cpo"
I get:
cpoptions=aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;
Adri
--
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_use/4957f8a3-f867-d23f-d51d-0b1220f81d65%40a3.xs4all.nl.