Mercurial > vim-gutentags
changeset 157:6b00f4383708
Support project root markers that are wildcard patterns.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 15 Feb 2017 17:14:12 -0800 |
parents | 40153c7a1887 |
children | bba76de4371a |
files | autoload/gutentags.vim |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/autoload/gutentags.vim Wed Jan 11 23:50:00 2017 -0800 +++ b/autoload/gutentags.vim Wed Feb 15 17:14:12 2017 -0800 @@ -97,11 +97,12 @@ let l:markers = get(g:gutentags_file_list_command, 'markers', []) if type(l:markers) == type({}) for [marker, file_list_cmd] in items(l:markers) - if getftype(a:path . '/' . marker) != "" + if !empty(globpath(a:path, marker, 1)) return gutentags#validate_cmd(file_list_cmd) endif endfor endif + return get(g:gutentags_file_list_command, 'default', "") endif return "" endfunction @@ -125,7 +126,7 @@ endif while l:path != l:previous_path for root in l:markers - if getftype(l:path . '/' . root) != "" + if !empty(globpath(l:path, root)) let l:proj_dir = simplify(fnamemodify(l:path, ':p')) let l:proj_dir = gutentags#stripslash(l:proj_dir) if l:proj_dir == ''