Hi,

I know that this feature is not widening the power of Vim regexps.
Indeed, it is just to add some clarity.

Actually the backward compatibility is not a problem, since semi
columns in \{ } give a syntax error.
Thanks you for the advice though, it is something I did not even think of...

I'll see if I can get some time to dive into this...

I am still open to any comment about this.

Cheers,

--
Romain Chossart



On Wed, Sep 29, 2010 at 9:12 PM, Marc Weber <[email protected]> wrote:
> Excerpts from Romain Chossart's message of Wed Sep 29 18:07:40 +0200 2010:
>> Don't ask for the usefulness of the last example...
> Your use case would be of interest to me:)
>
> You could encode it as
>
> \d\{-1\}\|\d\{3} .... [X]
> It is more verbose. So it depends on how often you use it.
> \d\d\%(\d\d)\? can be used to match years. But its limited and less nice
> than \d\{2,4}. I agree.
>
> I had much success with writing helper functions such as
>
> MyHelper(regex, [1,3,20]) which does  what I showed at {X] above.
>
> Your feature may be useful. But if you want others to use your code you
> have to be backward compatible for a while which means using a
> workaround in any way.
>
> Marc Weber
>
> --
> 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

Raspunde prin e-mail lui