Foo.vim: vim9script
export class Foo def new() enddef def Bar(s: string) echo $"{s} works" enddef endclass vim9_regression.vim: vim9script if get(g:, 'did_foo', false) finish endif g:did_foo = true import autoload './Foo.vim' var foo = Foo.Foo.new() command -buffer -bar -nargs=1 Foo foo.Bar(<f-args>) Source vim9_regression.vim, and run ":Foo bar" and you'll get the expected "bar works" message, but source vim9_regression.vim again you'll get: E121: Undefined variable: foo -- Christian J. Robinson <hept...@gmail.com> -- -- You received this message from the "vim_dev" 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_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/CAK14FZ%2Bbw_ZB5M8qUBxEpS1LRWeb-LgUU1U-Bpp_Araz4PHoaQ%40mail.gmail.com.