patch 7.4.1550
Problem: Cannot load packages early.
Solution: Add the ":packloadall" command.
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 19d7d19..616f7a0 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3189,14 +3189,21 @@
vim_free(ffname);
}
+static int did_source_packages = FALSE;
+
/*
+ * ":packloadall"
* Find plugins in the package directories and source them.
*/
void
-source_packages()
+ex_packloadall(exarg_T *eap)
{
- do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
+ if (!did_source_packages || (eap != NULL && eap->forceit))
+ {
+ did_source_packages = TRUE;
+ do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
add_pack_plugin, p_pp);
+ }
}
/*