Mercurial > vim-gutentags
changeset 149:f915393ff68d
Add `g:gutentags_dont_load` setting.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 07 Dec 2016 21:46:02 -0800 |
parents | b178f2251982 |
children | 4055c696a9b4 |
files | doc/gutentags.txt plugin/gutentags.vim |
diffstat | 2 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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)