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:
parent
e9a783857b
commit
c9bb2921dc
@ -11,6 +11,13 @@ if exists('did_UltiSnips_vim') || &cp || version < 700
|
|||||||
finish
|
finish
|
||||||
endif
|
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")
|
if !exists("g:UltiSnipsUsePythonVersion")
|
||||||
let g:_uspy=":py3 "
|
let g:_uspy=":py3 "
|
||||||
if !has("python3")
|
if !has("python3")
|
||||||
|
Loading…
Reference in New Issue
Block a user