\@= doesn't seem to be working in very magic mode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

\@= doesn't seem to be working in very magic mode

Mohit Sharma
Hey guys,

Are \@* (\@=, \@! etc.) supported in vim's "very magic" mode? It doesn't seem to be working for me e.g.

for text "foobar" when I do

>>/\vfoo(bar)\@= matches foobar
>>/foo\(bar\)\@= matches foo correctly

it matches the entire foobar instead of just foo. Is this expected?


Thanks
Mohit

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: \@= doesn't seem to be working in very magic mode

Paul Isambert
Mohit Sharma <[hidden email]> a écrit:

> Hey guys,
>
> Are \@* (\@=, \@! etc.) supported in vim's "very magic" mode? It doesn't
> seem to be working for me e.g.
>
> for text "foobar" when I do
>
> >>/\vfoo(bar)\@= matches foobar
> >>/foo\(bar\)\@= matches foo correctly
>
> it matches the entire foobar instead of just foo. Is this expected?

@ shouldn’t be escaped with \v, because only [0-9A-Za-z_] have their
usual (unescaped) meaning; the correct pattern is:

    \vfoo(bar)@=

Best,
Paul

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: \@= doesn't seem to be working in very magic mode

Mohit Sharma



On Mon, Dec 30, 2013 at 12:02 AM, Paul Isambert <[hidden email]> wrote:
Mohit Sharma <[hidden email]> a écrit:
> Hey guys,
>
> Are \@* (\@=, \@! etc.) supported in vim's "very magic" mode? It doesn't
> seem to be working for me e.g.
>
> for text "foobar" when I do
>
> >>/\vfoo(bar)\@= matches foobar
> >>/foo\(bar\)\@= matches foo correctly
>
> it matches the entire foobar instead of just foo. Is this expected?

@ shouldn’t be escaped with \v, because only [0-9A-Za-z_] have their
usual (unescaped) meaning; the correct pattern is:
 
    \vfoo(bar)@=

Ahh I knew I was doing something stupid, my bad. Thanks

 

Best,
Paul

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.