From 93be385d382e2330539bcd34bf052d9703dc1a88 Mon Sep 17 00:00:00 2001 From: opennota Date: Sat, 21 Jun 2014 12:35:25 +0700 Subject: [PATCH] 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. --- ftdetect/UltiSnips.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftdetect/UltiSnips.vim b/ftdetect/UltiSnips.vim index e5df595..2814c95 100644 --- a/ftdetect/UltiSnips.vim +++ b/ftdetect/UltiSnips.vim @@ -3,6 +3,6 @@ if has("autocmd") augroup UltiSnipsFileType au! - autocmd FileType * call UltiSnips#FileTypeChanged() + autocmd FileType * if exists('*UltiSnips#FileTypeChanged')|call UltiSnips#FileTypeChanged()|endif augroup END endif