comparison plugin/autotags.vim @ 5:12f4f50f4d3a

Use CtrlP root markers if they've been defined.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 20 Jul 2014 14:38:44 -0700
parents 60adce96ac2d
children f0f1d20d6f5c
comparison
equal deleted inserted replaced
4:512eaa56c7db 5:12f4f50f4d3a
111 " Finds the tag file path for the given current directory 111 " Finds the tag file path for the given current directory
112 " (typically the directory of the file being edited) 112 " (typically the directory of the file being edited)
113 function! s:get_tagfile_for(path) abort 113 function! s:get_tagfile_for(path) abort
114 let l:path = s:stripslash(a:path) 114 let l:path = s:stripslash(a:path)
115 let l:previous_path = "" 115 let l:previous_path = ""
116 let l:markers = g:autotags_project_root[:]
117 if exists('g:ctrlp_root_markers')
118 let l:markers += g:ctrlp_root_markers
119 endif
116 while l:path != l:previous_path 120 while l:path != l:previous_path
117 for root in g:autotags_project_root 121 for root in g:autotags_project_root
118 if getftype(l:path . '/' . root) != "" 122 if getftype(l:path . '/' . root) != ""
119 return simplify(fnamemodify(l:path, ':p') . g:autotags_tagfile) 123 return simplify(fnamemodify(l:path, ':p') . g:autotags_tagfile)
120 endif 124 endif