Mercurial > vim-gutentags
comparison autoload/gutentags.vim @ 67:57649935316f
Only consider main filetype in cases like 'python.django'
author | marc <marc@lamarciana.com> |
---|---|
date | Sun, 17 May 2015 10:43:24 +0200 |
parents | a14a788e3809 |
children | 6900302dae0b |
comparison
equal
deleted
inserted
replaced
66:a14a788e3809 | 67:57649935316f |
---|---|
175 endif | 175 endif |
176 endfunction | 176 endfunction |
177 | 177 |
178 " Get final ctags executable depending whether a filetype one is defined | 178 " Get final ctags executable depending whether a filetype one is defined |
179 function! gutentags#get_ctags_executable() abort | 179 function! gutentags#get_ctags_executable() abort |
180 if exists('g:gutentags_ctags_executable_{&filetype}') | 180 "Only consider the main filetype in cases like 'python.django' |
181 return g:gutentags_ctags_executable_{&filetype} | 181 let l:ftype = get(split(&filetype, '\.'), 0, '') |
182 if exists('g:gutentags_ctags_executable_{l:ftype}') | |
183 return g:gutentags_ctags_executable_{l:ftype} | |
182 else | 184 else |
183 return g:gutentags_ctags_executable | 185 return g:gutentags_ctags_executable |
184 endif | 186 endif |
185 endfunction | 187 endfunction |
186 | 188 |