Hi, On Fri, Jul 19, 2019 at 1:20 AM FUJIWARA Takuya <[email protected]> wrote: > > I usually use get() for this purpose. > > let default_value = 42 > let g:myplugin_globalvar = get(g:, 'myplugin_globalvar', default_value) >
This example of using the get() function with the g: dictionary to get either the current value or the default value of a variable should be mentioned somewhere in the help. Regards, Yegappan -- -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7mXJXS7qMOf%2BGRc7zFco4cHZHo6dJsuvDczVxNoA0ObhA%40mail.gmail.com.
