Saturday, July 23, 2022

Re: vim9 _vimrc compatibility with vim8 plugin

Yes, taking into account these behaviors by default, it does not prevent that I note as an interference when I affect in my _vim9rc a global variable put in interface of the script legacy gutentags.  This global variable, actually a list of strings, in the legacy script is retrieved by a get(g:, nomVar) in a variable with the same name.  Then it is tested at line 44 of gutentags plugin that missunderstood the type. It seems that this worked in legacy script but as soon as it is assigned in a vim9 script like my _vim9rc it alters the initial operation.  While it shouldn't in the sense that a global remains a global whether swapped between a vim9 or a vim8 script legacy

Le vendredi 22 juillet 2022 à 21:54:57 UTC+2, Bram Moolenaar a écrit :

> It's like when setting a global variable from _vim9rc, it *affects
> vim8 *script same global variable.

In Vim9 script variables are script-local by default, prefixing g: is
required to access global variables.

In legacy script variables are global by default, prefixing s: is
required to access script-local variables.


--
hundred-and-one symptoms of being an internet addict:
94. Now admit it... How many of you have made "modem noises" into
the phone just to see if it was possible? :-)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/c55bd9aa-7157-4734-bede-405b50c90349n%40googlegroups.com.

No comments: