UltiSnips/ftdetect/UltiSnips.vim
opennota 93be385d38 Don't complain about undefined function
When lazy loading UltiSnips on specific filetypes ([vim-plug](https://github.com/junegunn/vim-plug) and [NeoBundle](https://github.com/Shougo/neobundle.vim) can do that), UltiSnips#FileTypeChanged() function can be undefined while ftdetect/UltiSnips.vim is loading.
2014-06-21 12:35:25 +07:00

9 lines
296 B
VimL

" This has to be called before ftplugins are loaded. Therefore
" it is here in ftdetect though it maybe shouldn't
if has("autocmd")
augroup UltiSnipsFileType
au!
autocmd FileType * if exists('*UltiSnips#FileTypeChanged')|call UltiSnips#FileTypeChanged()|endif
augroup END
endif