diff autoload/gutentags.vim @ 47:7b419abf7fba

Add ability to disable Gutentags if a `.notags` file is at the root.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 09 Apr 2015 21:14:18 -0700
parents c0f56e4d52bd
children c1b33dc55b1c
line wrap: on
line diff
--- 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])