The setting of the default values for the autoload variables is moved out of
any function. One reason being that these settings do not depend on the
argument of the function. The second being that Vim will source the autoload
script if an undefined autoload variable is referenced and the file is
expected to define the variable (see :help autoload).
All global variables that are not part of the public API (mentioned in the
documentation) are turned into autoload variables. This is intended to give
all global variables defined by Vundle.vim a common prefix. The variable
g:default_git_proto is part of the public API and is therefor not changed.
This is the only exception.
Changed:
g:bundle_dir -> vundle#bundle_dir
g:bundles -> vundle#bundles
g:updated_bundles -> vundle#updated_bundles
g:vundle_lazy_load -> vundle#lazy_load
g:vundle_log -> vundle#log
Unchanged:
g:default_git_proto
If it was loaded, unload the log buffer before editing it. Otherwise the
editing command can "hang" if the user has `set hidden`.
This problem was originally discovered with the VundleChangelog command and
the analogous fix was applied in 7d9b10. See github issue #468 for more.
These variables only occur in one file each. By making them script local
variables this is "documented" in the code. At the same time the global
namespace is polluted less.
Changed:
g:bundle_names -> s:bundle_names
g:vundle_last_status -> s:last_status
g:vundle_log_file -> s:log_file
g:vundle_view -> s:view
Vundle manipulates plugin folders by `cd`-ing into them and calling git
via `call system(cmd)`. This doesn't work if GIT_DIR is set as a global
environmental variable (most commonly by a git hook). Since there is no
use case in which Vundle should respect GIT_DIR, this PR preemptively
precedes all git calls with `unset GIT_DIR; `. This makes the git calls
behave as expected without unsetting GIT_DIR in the environment beyond
vim.
Rearranging rtp so that **all** default directories appear first has the
undesired side effect of not allowing plugins to override default syntax
files.
This changeset limits the rearrangement of the rtp to simply making sure
the first directory in the default runtimepath appears first in also in
the runtimepath after Vundle has finished manipulating it.
This should keep the original bugs fixed and should eliminate the
aforementioned undesired side effect.
Fixes#430Fixes#456