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.
This commit is contained in:
Aaron Schrab 2012-07-31 15:25:36 -04:00
parent e9a783857b
commit c9bb2921dc

View File

@ -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")