# HG changeset patch # User Ludovic Chabant # Date 1481175962 28800 # Node ID f915393ff68d9e436146845663ae7f76cf2b2707 # Parent b178f2251982dd43dc5eaaba3bcf8eae2c3795f2 Add `g:gutentags_dont_load` setting. diff -r b178f2251982 -r f915393ff68d doc/gutentags.txt --- a/doc/gutentags.txt Wed Dec 07 21:20:50 2016 -0800 +++ b/doc/gutentags.txt Wed Dec 07 21:46:02 2016 -0800 @@ -227,6 +227,18 @@ don't. Defaults to 1. + *gutentags_dont_load* +g:gutentags_dont_load + Prevents Gutentags from loading at all on Vim startup. + + The difference between this and |gutentags_enabled| is + that |gutentags_enabled| can be turned on and off in + the same Vim session -- Gutentags as a plugin stays + loaded and will keep track of what happened while it + was disabled. However, |gutentags_dont_load| only + works on Vim startup and will prevent Gutentags from + loading at all, as if it wasn't there. + *gutentags_ctags_executable* g:gutentags_ctags_executable Specifies the ctags executable to launch. diff -r b178f2251982 -r f915393ff68d plugin/gutentags.vim --- a/plugin/gutentags.vim Wed Dec 07 21:20:50 2016 -0800 +++ b/plugin/gutentags.vim Wed Dec 07 21:46:02 2016 -0800 @@ -4,6 +4,10 @@ " Globals {{{ +if (&cp || get(g:, 'gutentags_dont_load', 0)) + finish +endif + if v:version < 704 echoerr "gutentags: this plugin requires vim >= 7.4." finish @@ -11,7 +15,7 @@ let g:gutentags_debug = get(g:, 'gutentags_debug', 0) -if (exists('g:loaded_gutentags') || &cp) && !g:gutentags_debug +if (exists('g:loaded_gutentags') && !g:gutentags_debug) finish endif if (exists('g:loaded_gutentags') && g:gutentags_debug)