Re: Re: Syntax: Using \v (very magic) in patterns in syntax files

"'c.willis111 ' via vim_use" <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <[email protected]>

 
------ Original Message ------
From: [email protected]
To: [email protected] Cc: [email protected]
Sent: Saturday, November 23rd 2024, 15:34
Subject: Re: Syntax: Using \v (very magic) in patterns in syntax files
 


 
Den lör 23 nov. 2024 14:35'c.willis111 ' via vim_use 
<[email protected] <mailto:[email protected]> > skrev:
 

 
------ Original Message ------
From: [email protected] <mailto:[email protected]>
To: [email protected] <mailto:[email protected]>  Cc: [email protected] 
<mailto:[email protected]>
Sent: Saturday, November 23rd 2024, 13:25
Subject: Syntax: Using \v (very magic) in patterns in syntax files
 
I have noticed that patterns in published syntax files never use the 
`\v` (very magic) modifier. Is there any deeper reason than people's 
preferences for this? Being used to Perl patterns I practically always 
use it and find it hard to keep track of when to use backslashes when 
not using it. The result is that more or less subtle errors creep in 
when I'm writing a syntax file, so I'd prefer to use it unless it's a 
Really Bad Idea.
 
Hi
I deeply sympathise with you. It seems complete madness that the 
slashing is different for various quantifiers. (* recognised as a meta 
character, but not +  or ?). My reading of the help suggests that very 
magic doesn't cure this.
 

 
It does in that all ASCII punctuation characters can be escaped to be 
&quot;normal&quot; and those that are metacharacters are meta when not 
escaped. Word characters, quite sensibly do still need a backslash to be 
meta. That's consistent enough for me.
 
You seem to be talking about the perl behaviour, which seems consistent 
to me. My whinge was about the vim behaviour. Heree's a help snippet:
 
4. Overview of pattern items                            pattern-overview
                                               E865 E866 E867 E869
Overview of multi items.                                /multi E61 E62
More explanation and examples below, follow the links.          E64 E871
         multi
    'magic' 'nomagic'  matches of the preceding atom
/star   *       \*      0 or more       as many as possible
/\+     \+      \+      1 or more       as many as possible
/\=     \=      \=      0 or 1          as many as possible
/\?     \?      \?      0 or 1          as many as possible
 

regards - Chris
-- 
-- 
You received this message from the &quot;vim_use&quot; 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 
<http://www.vim.org/maillist.php>
--- 
You received this message because you are subscribed to the Google 
Groups &quot;vim_use&quot; group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to 
[email protected]">[email protected] 
<mailto:vim_use+%3Cspan+class=> .
To view this discussion visit 
https://groups.google.com/d/msgid/vim_use/CADAJKhB8xGaYuvoY9-ZOu2%2BNifq4gbmP_x6TY%3Ddh-T2JkQN8%3Dw%40mail.gmail.com 
<https://groups.google.com/d/msgid/vim_use/CADAJKhB8xGaYuvoY9-ZOu2%2BNifq4gbmP_x6TY%3Ddh-T2JkQN8%3Dw%40mail.gmail.com?utm_medium=email&utm_source=footer> 
.
 
 
-- 
-- 
You received this message from the &quot;vim_use&quot; 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 
<http://www.vim.org/maillist.php>
--- 
You received this message because you are subscribed to the Google 
Groups &quot;vim_use&quot; group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to [email protected]&quot; 
target=&quot;_blank&quot;>[email protected] 
<mailto:vim_use+<span class=> .
To view this discussion visit 
https://groups.google.com/d/msgid/vim_use/304a56a7.2408d.193593adb00.Webtop.251%40btinternet.com 
<https://groups.google.com/d/msgid/vim_use/304a56a7.2408d.193593adb00.Webtop.251%40btinternet.com?utm_medium=email&utm_source=footer> 
.
 

 
-- 
-- 
You received this message from the &quot;vim_use&quot; 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 
<http://www.vim.org/maillist.php>
--- 
You received this message because you are subscribed to the Google 
Groups &quot;vim_use&quot; group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to 
[email protected]&quot;>[email protected] 
<mailto:vim_use+<span class=> .
To view this discussion visit 
https://groups.google.com/d/msgid/vim_use/CADAJKhA4ztK4E-8fcDX40xn0s9hBg5v4VQ6URJmUm9E3967Jfw%40mail.gmail.com 
<https://groups.google.com/d/msgid/vim_use/CADAJKhA4ztK4E-8fcDX40xn0s9hBg5v4VQ6URJmUm9E3967Jfw%40mail.gmail.com?utm_medium=email&utm_source=footer> 
.
 

-- 
-- 
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 visit https://groups.google.com/d/msgid/vim_use/3216be5b.24523.19359bc2e94.Webtop.251%40btinternet.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.