diff options
author | Peter Odding <peter@peterodding.com> | 2011-09-05 20:32:33 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2011-09-05 20:32:33 +0200 |
commit | fae8ddd3b6cdf823113ed2a911daa7d319885f7a (patch) | |
tree | fe37d31e8b66e448428b10267564b69cad7d64d2 /autoload | |
parent | ef7c6f8b06ece681695226755117ed3c21960924 (diff) | |
download | vim-easytags-fae8ddd3b6cdf823113ed2a911daa7d319885f7a.tar.gz |
Improve easytags_dynamic_files implementation (best of both worlds?)
Some users want the plug-in to use existing project specific tags files
but fall back to the global tags file or a file type specific tags file
if a project specific tags file does not exist. Other users want the
plug-in to automatically create project specific tags files. Both are
reasonable options to have. I hope with this change we can all
be happy :-) (see also issue #15 and issue #16 on GitHub).
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/xolox/easytags.vim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 5c5334e..39102e2 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -3,7 +3,7 @@ " Last Change: September 5, 2011 " URL: http://peterodding.com/code/vim/easytags/ -let g:xolox#easytags#version = '2.5.6' +let g:xolox#easytags#version = '2.5.7' " Public interface through (automatic) commands. {{{1 @@ -530,7 +530,10 @@ endfunction function! xolox#easytags#get_tagsfile() " {{{2 let tagsfile = '' " Look for a suitable project specific tags file? - if xolox#misc#option#get('easytags_dynamic_files', 0) + let dynamic_files = xolox#misc#option#get('easytags_dynamic_files', 0) + if dynamic_files == 1 + let tagsfile = get(tagfiles(), 0, '') + elseif dynamic_files == 2 let tagsfile = xolox#misc#option#eval_tags(&tags, 1) endif " Check if a file type specific tags file is useful? |