# HG changeset patch # User Ludovic Chabant # Date 1465871152 25200 # Node ID e673026faa5685226c9b4911303bd66acb4c2f53 # Parent db773e26e43b22805e7ae01e27ff2d465ecf38a6 Add option to not append the default project root markers. diff -r db773e26e43b -r e673026faa56 doc/gutentags.txt --- a/doc/gutentags.txt Mon Jun 13 19:15:17 2016 -0700 +++ b/doc/gutentags.txt Mon Jun 13 19:25:52 2016 -0700 @@ -239,9 +239,18 @@ file named after |gutentags_tagfile| will be created at the project root. Defaults to `[]` (an empty |List|). - A list of default markers will always be appended to - the user-defined ones: ['.git', '.hg', '.bzr', - '_darcs']. + A list of default markers will be appended to the + user-defined ones unless + |gutentags_add_default_project_roots| is set to 0. + + *gutentags_add_default_project_roots* +g:gutentags_add_default_project_roots + Defines whether Gutentags should always define some + default project roots (see |gutentags_project_root|). + This can be useful to prevent unnecessary disk access + when Gutentags searches for a project root. + The default markers are: + `['.git', '.hg', '.bzr', '_darcs', '_darcs', '_FOSSIL_', '.fslckout']` *gutentags_exclude_project_root* g:gutentags_exclude_project_root diff -r db773e26e43b -r e673026faa56 plugin/gutentags.vim --- a/plugin/gutentags.vim Mon Jun 13 19:15:17 2016 -0700 +++ b/plugin/gutentags.vim Mon Jun 13 19:25:52 2016 -0700 @@ -27,8 +27,11 @@ let g:gutentags_enabled_user_func = get(g:, 'gutentags_enabled_user_func', '') let g:gutentags_modules = get(g:, 'gutentags_modules', ['ctags']) +let g:gutentags_add_default_project_roots = get(g:, 'gutentags_add_default_project_roots', 1) let g:gutentags_project_root = get(g:, 'gutentags_project_root', []) -let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout'] +if g:gutentags_add_default_project_roots + let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout'] +endif let g:gutentags_project_info = get(g:, 'gutentags_project_info', []) call add(g:gutentags_project_info, {'type': 'python', 'file': 'setup.py'})