On Fri, Apr 5, 2019 at 8:09 PM Bram Moolenaar <Bram@moolenaar.net> 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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Friday, April 5, 2019
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment