Mercurial > vim-gutentags
changeset 93:edd488d8d37e
Give some error message if there's no available `ctags` on the system.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 17 Feb 2016 23:30:24 -0800 |
parents | 6bbed9e4c01e |
children | 9def999915f2 |
files | autoload/gutentags/ctags.vim |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/autoload/gutentags/ctags.vim Wed Feb 17 23:29:49 2016 -0800 +++ b/autoload/gutentags/ctags.vim Wed Feb 17 23:30:24 2016 -0800 @@ -37,6 +37,14 @@ if g:gutentags_auto_set_tags execute 'setlocal tags^=' . fnameescape(b:gutentags_files['ctags']) endif + + " Check if the ctags executable exists. + if g:gutentags_enabled && executable(g:gutentags_ctags_executable) == 0 + let g:gutentags_enabled = 0 + echoerr "Executable '".g:gutentags_ctags_executable."' can't be found. " + \."Gutentags will be disabled. You can re-enable it by " + \."setting g:gutentags_enabled back to 1." + endif endfunction function! gutentags#ctags#generate(proj_dir, tags_file, write_mode) abort