Re: [vim/vim] PackAdded autocmd-event (Issue #18714)

Christian Brabandt (Vim Github Repository) <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/issues/18714/[email protected]>
chrisbra left a comment (vim/vim#18714)

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

I'd say, that even if you seldomly use `my_pack` then it makes sense to set those variables. Yes those variables are polluting the global namespace, but for the reason to configure your pack, whether or not you are using that pack during the current session does not matter. 

Alternatively: create a custom `:packadd` command, that sets those variables first and loads the pack then.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/issues/18714#issuecomment-5345067454
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/5345067454%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.