comparison autoload/gutentags/ctags.vim @ 141:7bc4df0225d1

Add support for specifying buffer-specific tagfiles.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 22 Sep 2016 22:14:17 -0700
parents 286e5b3095d0
children b178f2251982
comparison
equal deleted inserted replaced
140:95092f4fbc4b 141:7bc4df0225d1
15 let s:runner_exe = gutentags#get_plat_file('update_tags') 15 let s:runner_exe = gutentags#get_plat_file('update_tags')
16 let s:unix_redir = (&shellredir =~# '%s') ? &shellredir : &shellredir . ' %s' 16 let s:unix_redir = (&shellredir =~# '%s') ? &shellredir : &shellredir . ' %s'
17 17
18 function! gutentags#ctags#init(project_root) abort 18 function! gutentags#ctags#init(project_root) abort
19 " Figure out the path to the tags file. 19 " Figure out the path to the tags file.
20 let l:tagfile = getbufvar("", 'gutentags_tagfile', g:gutentags_tagfile)
20 let b:gutentags_files['ctags'] = gutentags#get_cachefile( 21 let b:gutentags_files['ctags'] = gutentags#get_cachefile(
21 \a:project_root, g:gutentags_tagfile) 22 \a:project_root, l:tagfile)
22 23
23 " Set the tags file for Vim to use. 24 " Set the tags file for Vim to use.
24 if g:gutentags_auto_set_tags 25 if g:gutentags_auto_set_tags
25 execute 'setlocal tags^=' . fnameescape(b:gutentags_files['ctags']) 26 execute 'setlocal tags^=' . fnameescape(b:gutentags_files['ctags'])
26 endif 27 endif