Consider the following script:
execute 'if 0'
echo 'Not shown'
else
echo 'Shown'
endif
. If you source it you find that instead of 3 errors (“missing :endif”, “:else
without :if”, “:endif without :if”) and two messages (“Not shown” and “Shown”)
you will see one messa
ZyX wrote:
> Consider the following script:
>
> execute 'if 0'
> echo 'Not shown'
> else
> echo 'Shown'
> endif
>
> . If you source it you find that instead of 3 errors (“missing
> :endif”, “:else without :if”, “:endif without :if”) and two messages
> (“Not shown” an
On 15:33 Sat 22 Mar , Bram Moolenaar wrote:
>
> ZyX wrote:
>
> > Consider the following script:
> >
> > execute 'if 0'
> > echo 'Not shown'
> > else
> > echo 'Shown'
> > endif
> >
> > . If you source it you find that instead of 3 errors (“missing
> > :endif”, “:e
On Sat, Mar 22, 2014 at 11:33 PM, Bram Moolenaar wrote:
>
> ZyX wrote:
>
> > Consider the following script:
> >
> > execute 'if 0'
> > echo 'Not shown'
> > else
> > echo 'Shown'
> > endif
> >
> > . If you source it you find that instead of 3 errors (“missing
> > :endif
> The docs are wrong, using "if" is allowed. The other two are not.
Why? It makes parsing impossible. E.g. like indicated by @Yukihiro Nakadaira,
there is absolutely nothing you can do with this error unless you add hacks for
some specific cases (e.g. if `execute` is followed by a string litera
ZyX wrote:
> > The docs are wrong, using "if" is allowed. The other two are not.
>
> Why? It makes parsing impossible. E.g. like indicated by @Yukihiro
> Nakadaira, there is absolutely nothing you can do with this error
> unless you add hacks for some specific cases (e.g. if `execute` is
> foll
Marcin Szamotulski wrote:
> On 15:33 Sat 22 Mar , Bram Moolenaar wrote:
> >
> > ZyX wrote:
> >
> > > Consider the following script:
> > >
> > > execute 'if 0'
> > > echo 'Not shown'
> > > else
> > > echo 'Shown'
> > > endif
> > >
> > > . If you source it you fi
On Mar 23, 2014 12:19 AM, "Bram Moolenaar" wrote:
>
>
> ZyX wrote:
>
> > > The docs are wrong, using "if" is allowed. The other two are not.
> >
> > Why? It makes parsing impossible. E.g. like indicated by @Yukihiro
> > Nakadaira, there is absolutely nothing you can do with this error
> > unless
Nikolay Pavlov wrote:
> On Mar 23, 2014 12:19 AM, "Bram Moolenaar" wrote:
> >
> >
> > ZyX wrote:
> >
> > > > The docs are wrong, using "if" is allowed. The other two are not.
> > >
> > > Why? It makes parsing impossible. E.g. like indicated by @Yukihiro
> > > Nakadaira, there is absolutely noth