Browse files

Rename no_activate_hack to source_missing_files (with the opposite me…


Document new option
Add bang after autocmd: it appears that autoload/vam.vim is sourced twice on my system

Profiling shows that this hack takes 0.025 seconds to run on my system even though normpath is called 232 times and vam#GlobInDir is called 66 times
  • Loading branch information...
1 parent ae5b989 commit 60e7f48a7b44dd5d77168e96219aa06983435be8 @ZyX-I ZyX-I committed Nov 22, 2012
Showing with 8 additions and 3 deletions.
  1. +3 −3 autoload/vam.vim
  2. +5 −0 doc/vim-addon-manager-additional-documentation.txt
@@ -47,7 +47,7 @@ let s:c.plugin_dir_by_name = get(s:c, 'plugin_dir_by_name', 'vam#DefaultPlug
let s:c.addon_completion_lhs = get(s:c, 'addon_completion_lhs', '<C-x><C-p>')
let s:c.debug_activation = get(s:c, 'debug_activation', 0)
let s:c.pool_item_check_fun = get(s:c, 'pool_item_check_fun', 'none')
-let s:c.no_activate_hack = get(s:c, 'no_activate_hack', 0)
+let s:c.source_missing_files = get(s:c, 'source_missing_files', 1)
" experimental: will be documented when its tested
" don't echo lines, add them to a buffer to prevent those nasty "Press Enter"
@@ -403,9 +403,9 @@ fun! vam#GlobThenSource(glob)
call vam#SourceFiles(vam#GlobList(a:glob))
-if !s:c.no_activate_hack
+if s:c.source_missing_files
- autocmd VimEnter * call vam#SourceMissingPlugins()
+ autocmd! VimEnter * call vam#SourceMissingPlugins()
augroup END
@@ -354,6 +354,11 @@ debug_activation *VAM-debug_activation*
Bool, makes VAM print lines explaining reasons for activation
particular plugins. Not pretty - but helpful in some cases.
+source_missing_files *VAM-source_missing_files*
+ Bool, determines whether VAM should check whether all plugin/ files
+ were sourced at the point of |VimEnter| event and source missed ones.
+ Default: 1.
The following options are used by vim-addon-manager-known-repositories, not by
VAM itself. So if you set |vim-addon-manager-known| to another value they may
have no effect.

0 comments on commit 60e7f48

Please sign in to comment.