Re: search results depend on length

2011-11-01 Fir de Conversatie Christian Brabandt
Hi Andy! On Di, 01 Nov 2011, Andy Wokula wrote: Am 31.10.2011 22:59, schrieb Christian Brabandt: On Mo, 31 Okt 2011, Ernie Rael wrote: It's similar, but a list of chars that need escaping is more flexible. I could specify that '(' needs to be escaped to mean grouping and that '?' does not

Re: search results depend on length

2011-10-31 Fir de Conversatie Thilo Six
Tony Mechelynck wrote the following on 31.10.2011 00:08 Hello Tony, -- snip -- vi always matches wherever vim matches, so you have a kind of degenerate case here. Maybe what you wanted was /vi\%[m] or /vim\= See :help /\= :help /\%[] Best

Re: search results depend on length

2011-10-31 Fir de Conversatie Ernie Rael
On 10/31/2011 10:31 AM, Thilo Six wrote: Tony Mechelynck wrote the following on 31.10.2011 00:08 Hello Tony, -- snip -- vi always matches wherever vim matches, so you have a kind of degenerate case here. Maybe what you wanted was /vi\%[m] or /vim\= See :help /\=

Re: search results depend on length

2011-10-31 Fir de Conversatie Ingo Karkat
On 31-Oct-2011 20:37, Ernie Rael wrote: Off topic, but I've been wondering... Is there an option to use perl/python syntax for RE? If not, would that be a welcome patch? Could it be done with vim's scripting? Both have unique constructs, cp. :help perl-patterns. Also an optional string

Re: search results depend on length

2011-10-31 Fir de Conversatie Ernie Rael
On 10/31/2011 12:53 PM, Ingo Karkat wrote: On 31-Oct-2011 20:37, Ernie Rael wrote: Off topic, but I've been wondering... Is there an option to use perl/python syntax for RE? If not, would that be a welcome patch? Could it be done with vim's scripting? Both have unique constructs, cp. :help

Re: search results depend on length

2011-10-31 Fir de Conversatie Tony Mechelynck
On 31/10/11 18:31, Thilo Six wrote: [...] Thanks for the pointer. There are quite a lot of search atoms. Although i'll always try to look at 'pattern-atoms' i obviously have to learn. Which is quite fun sometimes. It is like playing vim-chess. Kind of. But it is quite a lot less fun if you are

Re: search results depend on length

2011-10-31 Fir de Conversatie Christian Brabandt
On Mo, 31 Okt 2011, Ernie Rael wrote: It's similar, but a list of chars that need escaping is more flexible. I could specify that '(' needs to be escaped to mean grouping and that '?' does not need to be escaped to mean optional. Using the list could be dependent on the magic-ness of a

Re: search results depend on length

2011-10-30 Fir de Conversatie Tony Mechelynck
On 29/10/11 11:22, Thilo Six wrote: Hello attached is a example file. When searching in there with: /vi\|vim or /vim\|vi does not give the same results. Which is what i would expect. Actually the latter gives the results i was vim asking for. My vim version is a bit dated though: 7.2.445 . Or

search results depend on length

2011-10-29 Fir de Conversatie Thilo Six
Hello attached is a example file. When searching in there with: /vi\|vim or /vim\|vi does not give the same results. Which is what i would expect. Actually the latter gives the results i was vim asking for. My vim version is a bit dated though: 7.2.445 . Or am i doing something wrong? --

Re: search results depend on length

2011-10-29 Fir de Conversatie Ivan Krasilnikov
2011/10/29 Thilo Six t@gmx.de: attached is a example file. When searching in there with: /vi\|vim or /vim\|vi does not give the same results. Which is what i would expect. This is the intended behavior. From :help regexp: A pattern is one or more branches, separated by \|. ... If more

Re: search results depend on length

2011-10-29 Fir de Conversatie Thilo Six
Thilo Six wrote the following on 29.10.2011 16:07 hello, -- snip -- So, /vi\|vim is same as /vi. Thank you for the pointers. I need to mentally keep a note about that for future. ,[ :help regexp ]- If more than one branch matches, the first one is used.

Re: search results depend on length

2011-10-29 Fir de Conversatie James McCoy
On Sat, Oct 29, 2011 at 2:04 PM, Thilo Six t@gmx.de wrote: Thilo Six wrote the following on 29.10.2011 16:07 hello, -- snip -- So, /vi\|vim is same as /vi. Thank you for the pointers. I need to mentally keep a note about that for future. ,[ :help regexp

Re: search results depend on length

2011-10-29 Fir de Conversatie Thilo Six
James McCoy wrote the following on 29.10.2011 20:25 Konichiwa James San, -- snip -- It's much easier to just change the regular expression to do what you want with the understanding of how regular expressions are used. Thats why i asked again. Thank you very much for the explanation. I'd