Skip to content

Commit

Permalink
Make it easier to debug tag file selection
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Aug 8, 2014
1 parent 83e8cf3 commit bfe2fed
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion autoload/xolox/easytags.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: July 19, 2014
" Last Change: August 8, 2014
" URL: http://peterodding.com/code/vim/easytags/

let g:xolox#easytags#version = '3.6.4'
Expand Down Expand Up @@ -448,15 +448,24 @@ function! xolox#easytags#get_tagsfile() " {{{2
let tagsfile = ''
endif
endif
if !empty(tagsfile)
call xolox#misc#msg#debug("easytags.vim %s: Selected dynamic tags file %s.", g:xolox#easytags#version, tagsfile)
endif
" Check if a file type specific tags file is useful?
let vim_file_type = xolox#easytags#filetypes#canonicalize(&filetype)
if empty(tagsfile) && !empty(g:easytags_by_filetype) && !empty(vim_file_type)
let directory = xolox#misc#path#absolute(g:easytags_by_filetype)
let tagsfile = xolox#misc#path#merge(directory, vim_file_type)
if !empty(tagsfile)
call xolox#misc#msg#debug("easytags.vim %s: Selected file type specific tags file %s.", g:xolox#easytags#version, tagsfile)
endif
endif
" Default to the global tags file?
if empty(tagsfile)
let tagsfile = expand(xolox#misc#option#get('easytags_file'))
if !empty(tagsfile)
call xolox#misc#msg#debug("easytags.vim %s: Selected global tags file %s.", g:xolox#easytags#version, tagsfile)
endif
endif
" If the tags file exists, make sure it is writable!
if filereadable(tagsfile) && filewritable(tagsfile) != 1
Expand Down

0 comments on commit bfe2fed

Please sign in to comment.