From c9bb2921dc5c5b0738768ff90b3228df6698b73a Mon Sep 17 00:00:00 2001 From: Aaron Schrab Date: Tue, 31 Jul 2012 15:25:36 -0400 Subject: [PATCH] Dummy version of UltiSnips_FileTypeChanged() Define a dummy version of the UltiSnips_FileTypeChanged function before checking for python support. If that function isn't defined, the autocommand defined in ftdetect/UltiSnips.vim will cause an error any time a new file is opened. That autocommand is setup before the function is defined, so we can't setup the autocommand only when the function exists. --- plugin/UltiSnips.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin/UltiSnips.vim b/plugin/UltiSnips.vim index 6603b48..31749fc 100644 --- a/plugin/UltiSnips.vim +++ b/plugin/UltiSnips.vim @@ -11,6 +11,13 @@ if exists('did_UltiSnips_vim') || &cp || version < 700 finish endif +" Define dummy version of function called by autocommand setup in +" ftdetect/UltiSnips.vim. If the function isn't defined (probably due to +" using a copy of vim without python support) it will cause an error anytime a +" new file is opened. +function! UltiSnips_FileTypeChanged() +endfunction + if !exists("g:UltiSnipsUsePythonVersion") let g:_uspy=":py3 " if !has("python3")