Documentation error for change 8.1.1116

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

Documentation error for change 8.1.1116

Tony Mechelynck
In helpfile repeat.txt line 331, a few lines below *:scriptversion*
there is:
            Does not apply to sourced scripts.
there should be:
            Only valid in a sourced script.

Trying to use the :scriptversion command outside of a sourced script
gives error E984: :scriptversion used outside of a sourced script

Testcase: type the following:
    :scriptversion 2 | echo .5 | scriptversion 1
then hit <Return>


Best regards,
Tony.

--
--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Documentation error for change 8.1.1116

Bram Moolenaar

Tony wrote:

> In helpfile repeat.txt line 331, a few lines below *:scriptversion*
> there is:
>             Does not apply to sourced scripts.
> there should be:
>             Only valid in a sourced script.

Let's make that a bit clearer:

                        Specify the version of Vim for the lines that follow
                        in the same file.  Only applies at the toplevel of
                        sourced scripts.

> Trying to use the :scriptversion command outside of a sourced script
> gives error E984: :scriptversion used outside of a sourced script
>
> Testcase: type the following:
>     :scriptversion 2 | echo .5 | scriptversion 1
> then hit <Return>

It also doesn't work inside a function.  I was wondering if it makes
sense there.  Would only be if you change style halfway a function,
which I would not expect to be useful.

--
Spam seems to be something useful to novices.  Later you realize that
it's a bunch of indigestable junk that only clogs your system.
Applies to both the food and the e-mail!

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Documentation error for change 8.1.1116

Tony Mechelynck
On Fri, Apr 5, 2019 at 8:09 PM Bram Moolenaar <[hidden email]> wrote:

>
>
> Tony wrote:
>
> > In helpfile repeat.txt line 331, a few lines below *:scriptversion*
> > there is:
> >             Does not apply to sourced scripts.
> > there should be:
> >             Only valid in a sourced script.
>
> Let's make that a bit clearer:
>
>                         Specify the version of Vim for the lines that follow
>                         in the same file.  Only applies at the toplevel of
>                         sourced scripts.

In view of what you said below, I suggest: "Only applies at the
toplevel of sourced scripts (i.e. outside of any function)".

Can it be used inside a conditional sequence (between :if and :else,
:while and :endwhile, etc.?)

Using an ex-command for that kind of status change makes me feel
uncomfortable. Wouldn't a 'cpoptions' flag have been better suited?
(Since the full stop is already taken, I suggest a colon.)

>
> > Trying to use the :scriptversion command outside of a sourced script
> > gives error E984: :scriptversion used outside of a sourced script
> >
> > Testcase: type the following:
> >     :scriptversion 2 | echo .5 | scriptversion 1
> > then hit <Return>
>
> It also doesn't work inside a function.  I was wondering if it makes
> sense there.  Would only be if you change style halfway a function,
> which I would not expect to be useful.


Best regards,
Tony.

--
--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Documentation error for change 8.1.1116

Bram Moolenaar

Tony wrote:

> > > In helpfile repeat.txt line 331, a few lines below *:scriptversion*
> > > there is:
> > >             Does not apply to sourced scripts.
> > > there should be:
> > >             Only valid in a sourced script.
> >
> > Let's make that a bit clearer:
> >
> >                         Specify the version of Vim for the lines that follow
> >                         in the same file.  Only applies at the toplevel of
> >                         sourced scripts.
>
> In view of what you said below, I suggest: "Only applies at the
> toplevel of sourced scripts (i.e. outside of any function)".
>
> Can it be used inside a conditional sequence (between :if and :else,
> :while and :endwhile, etc.?)

Yes.
 
> Using an ex-command for that kind of status change makes me feel
> uncomfortable. Wouldn't a 'cpoptions' flag have been better suited?
> (Since the full stop is already taken, I suggest a colon.)

No, because every script that uses a non-default script version must
state so.  There are always multiple scripts, and you can't expect them
all to be the same version.

--
hundred-and-one symptoms of being an internet addict:
206. You religiously respond immediately to e-mail, while ignoring
     your growing pile of snail mail.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
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/d/optout.