# HG changeset patch # User Ludovic Chabant # Date 1428639258 25200 # Node ID 7b419abf7fbaef9513ce31a3146556def2728b16 # Parent c0f56e4d52bd897bb4e70b2b76d03de1bf1e484d Add ability to disable Gutentags if a `.notags` file is at the root. diff -r c0f56e4d52bd -r 7b419abf7fba autoload/gutentags.vim --- a/autoload/gutentags.vim Thu Apr 09 21:02:25 2015 -0700 +++ b/autoload/gutentags.vim Thu Apr 09 21:14:18 2015 -0700 @@ -99,6 +99,11 @@ call gutentags#trace("Scanning buffer '" . bufname('%') . "' for gutentags setup...") try let b:gutentags_root = gutentags#get_project_root(expand('%:h')) + if filereadable(b:gutentags_root . '/.notags') + call gutentags#trace("'notags' file found... no gutentags support.") + return + endif + let b:gutentags_files = {} for module in g:gutentags_modules call call("gutentags#".module."#init", [b:gutentags_root]) diff -r c0f56e4d52bd -r 7b419abf7fba doc/gutentags.txt --- a/doc/gutentags.txt Thu Apr 09 21:02:25 2015 -0700 +++ b/doc/gutentags.txt Thu Apr 09 21:14:18 2015 -0700 @@ -102,6 +102,10 @@ known project markers), Gutentags is disabled for that buffer, and the following commands and remarks don't apply. +If you want to force-disable Gutentags for a given project even though it does +match one of the items in |gutentags_project_root|, create a file named +"`.notags`" at the root of the project. + The tag file that Gutentags creates and manages will be named after |gutentags_tagfile|, relative to the project's root directory. When Gutentags finds a valid project root, it will prepend the tag file's path to 'tags',