Mercurial > vim-gutentags
changeset 70:661a97eaf608
Move `get_ctags_executable` to the `ctags` module.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 16 Jul 2015 21:43:06 -0700 |
parents | 6900302dae0b |
children | 130905a7fb9a |
files | autoload/gutentags.vim autoload/gutentags/ctags.vim |
diffstat | 2 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/autoload/gutentags.vim Thu Jul 16 21:40:52 2015 -0700 +++ b/autoload/gutentags.vim Thu Jul 16 21:43:06 2015 -0700 @@ -182,17 +182,6 @@ endif endfunction -" Get final ctags executable depending whether a filetype one is defined -function! gutentags#get_ctags_executable() abort - "Only consider the main filetype in cases like 'python.django' - let l:ftype = get(split(&filetype, '\.'), 0, '') - if exists('g:gutentags_ctags_executable_{l:ftype}') - return g:gutentags_ctags_executable_{l:ftype} - else - return g:gutentags_ctags_executable - endif -endfunction - " Get the suffix for how to execute an external command. function! gutentags#get_execute_cmd_suffix() abort if has('win32')
--- a/autoload/gutentags/ctags.vim Thu Jul 16 21:40:52 2015 -0700 +++ b/autoload/gutentags/ctags.vim Thu Jul 16 21:43:06 2015 -0700 @@ -45,7 +45,7 @@ try " Build the command line. let l:cmd = gutentags#get_execute_cmd() . s:runner_exe - let l:cmd .= ' -e "' . gutentags#get_ctags_executable() . '"' + let l:cmd .= ' -e "' . s:get_ctags_executable() . '"' let l:cmd .= ' -t "' . a:tags_file . '"' let l:cmd .= ' -p "' . a:proj_dir . '"' if a:write_mode == 0 && filereadable(a:tags_file) @@ -108,6 +108,17 @@ " Utilities {{{ +" Get final ctags executable depending whether a filetype one is defined +function! s:get_ctags_executable() abort + "Only consider the main filetype in cases like 'python.django' + let l:ftype = get(split(&filetype, '\.'), 0, '') + if exists('g:gutentags_ctags_executable_{l:ftype}') + return g:gutentags_ctags_executable_{l:ftype} + else + return g:gutentags_ctags_executable + endif +endfunction + function! s:process_options_file(proj_dir, path) abort if g:gutentags_cache_dir == "" " If we're not using a cache directory to store tag files, we can