Friday, August 18, 2017

Re: source or load an autoload script

Le vendredi 18 août 2017 10:28:30 UTC+2, ZyX a écrit :
> 2017-08-18 11:13 GMT+03:00 Ni Va <nivaemail@gmail.com>:
> > Le jeudi 17 août 2017 22:55:13 UTC+2, Christian Brabandt a écrit :
> >> On Do, 17 Aug 2017, Ni Va wrote:
> >>
> >> > Hi,
> >> >
> >> >
> >> > I'am writing a plugin with autoload part:
> >> > myplugin\autoload\myplugin.vim
> >> >
> >> >
> >> > A Command mapped on a function of this autoload/myplugin.vim.
> >> >
> >> >
> >> >
> >> > I don't know other solution that quit vim and relaunch to source my modifications.
> >>
> >> I don't understand what problem you are trying to solve.
> >>
> >>
> >> Best,
> >> Christian
> >> --
> >> Es liegt in der menschlichen Natur, vernünftig zu denken und unlogisch
> >> zu handeln.
> >
> > OK. My problem is that I don't see effect when I modify a vimscript.
> > In the joined screen, you can see two vimscript. The right one is a 'class' instanciated in the left one. Then a simple command MK call MakeMyVim.
> >
> > So, if I modify my vimscritp class and launch MK command, I don't see effect of my change as if it was not sourced.
> >
> > Thank you by advance.
>
> You need to :source autoload file yourself, :unletting guard variable
> before sourcing. But note that this is generally incorrect, e.g. if
> you remove some function from autoload file, but forget to remove it
> from the users of the file, then function will stay in memory and
> users will still work, up until you restart Vim.
>
> Thus in any case restart Vim before publishing the modified script.
>
> >
> > --
> > --
> > 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.

Ok that was that I did. Restarting Vim. bouuh :(
Thank You ! :)

--
--
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.

No comments: