Hi Tony!

On Do, 28 Jan 2016, Tony Mechelynck wrote:

> On Thu, Jan 28, 2016 at 9:17 PM, Christian Brabandt 
> <vim-dev-git...@256bit.org>
> wrote:
> 
> 
>     Hm, I think you closed too early. In my opinion an empty glob pattern
>     should result in an empty regexp
> 
> 
> 
> 
> Christian, I wouldn't have thought this of you.

I am sorry.

> An empty glob pattern matches only the empty string.

Perhaps I am just confused, but what is an empty glob pattern?
Is that an empty pattern or a pattern where neither '*' nor '?' occurs?

> An empty Vim pattern matches anything.

Actually an empty Vim pattern matches nothing and Vim falls back and 
uses the previous pattern. In fact after using :let @/='' Vim falls back 
and uses the last substitution pattern. I found that surprising.

> So you can't translate one by the other. To match the empty string
> (with =~ and friends) you need '^$' which is what you already get.
> 
> Conclusion: It isn't a bug, it's a feature.

I am not sure yet. But I don't have a strong opinion on it either.

Mit freundlichen Grüßen
Christian
-- 
Das Glück besteht nicht darin, daß du tun kannst, was du willst,
sondern darin, daß du auch immer willst, was du tust.
                -- Leo Nikolajewitsch Tolstoj

-- 
-- 
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 because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to