From 7339b75e7d6fe8756371a4d4cbd9ad2d963e1704 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 30 Jan 2017 00:40:48 +0900 Subject: [PATCH] Updated faq (markdown) --- faq.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/faq.md b/faq.md index f628fc9..9b613cb 100644 --- a/faq.md +++ b/faq.md @@ -151,6 +151,18 @@ augroup END Yes, it automatically generates help tags for all of your plugins whenever you run `PlugInstall` or `PlugUpdate`. But you can regenerate help tags only with `plug#helptags()` function. +### When should I use `on` or `for` option? + +_"Premature optimization is the root of all evil."_ + +You most likely don't need them at all. A properly implemented Vim plugin should already load lazily without any help from the plugin manager (`:help autoload`). There are very few cases where those options actually make much sense. On-demand loading should only be used as the last resort. It is basically a hacky workaround and is not guaranteed to work in every case. + +Before applying the options, break down the startup of time of Vim using `--startuptime` first to identify the plugins that takes more than a few milliseconds. + +```vim +vim --startuptime /tmp/log +``` + ### Shouldn't vim-plug update itself on `PlugUpdate` like Vundle? There is a separate `PlugUpgrade` command and there are valid reasons behind the decision.