Re: [vim/vim] PackAdded autocmd-event (Issue #18714)
ubaldot (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/issues/18714/[email protected]> |
ubaldot left a comment (vim/vim#18714) I stumbled upon this again recently, while cleaning up my scripts. I try to explain better where the issue is. Say that `my_pack` can be configured through `g:foo` and `g:bar` variables. Such variables shall be defined _before_ `my_pack` is loaded. In-fact, they are generally defined in a `.vimrc` or any script file that shall be sourced before using `:packadd`. Now, say that `my_pack` is a package that I seldom use, and when I need it I just load it from the command-line through `:packadd my_pack`. The only choice I have is to define `g:foo` and `g:bar` regardless if I will use `my_pack` or not, thus polluting the global namespace even when not necessary. In-fact, I have a bunch of scripts defining config variables for various plugin in `~/.vim/plugin/`. In this way, when I run `:packadd my_pack` I am sure that everything will work, but when I won't use `my_pack` then I would be just polluting the global namespace. I hope it is more clear now. -- Reply to this email directly or view it on GitHub: https://github.com/vim/vim/issues/18714#issuecomment-5338153713 You are receiving this because you are subscribed to this thread. Message ID: <vim/vim/issues/18714/[email protected]> -- -- 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 visit https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/18714/5338153713%40github.com.