Remove deprecated functions like a boss.
This commit is contained in:
parent
becab789a8
commit
2ed217a059
@ -7,18 +7,6 @@ let b:did_autoload_ultisnips = 1
|
||||
exec g:_uspy "import vim"
|
||||
exec g:_uspy "from UltiSnips import UltiSnips_Manager"
|
||||
|
||||
if !exists("g:_uspy")
|
||||
" Delete the autocommands defined in plugin/UltiSnips.vim and
|
||||
" ftdetect/UltiSnips.vim.
|
||||
augroup UltiSnips
|
||||
au!
|
||||
augroup END
|
||||
augroup UltiSnipsFileType
|
||||
au!
|
||||
augroup END
|
||||
finish
|
||||
end
|
||||
|
||||
" FUNCTIONS {{{
|
||||
function! s:compensate_for_pum()
|
||||
""" The CursorMovedI event is not triggered while the popup-menu is visible,
|
||||
@ -125,18 +113,6 @@ function! UltiSnips#FileTypeChanged()
|
||||
endfunction
|
||||
|
||||
|
||||
function! UltiSnips#AddSnippet(trigger, value, description, options, ...)
|
||||
" Takes the same arguments as SnippetManager.add_snippet.
|
||||
echoerr "Deprecated UltiSnips#AddSnippet called. Please use UltiSnips#AddSnippetWithPriority." | sleep 1
|
||||
exec g:_uspy "args = vim.eval(\"a:000\")"
|
||||
exec g:_uspy "trigger = vim.eval(\"a:trigger\")"
|
||||
exec g:_uspy "value = vim.eval(\"a:value\")"
|
||||
exec g:_uspy "description = vim.eval(\"a:description\")"
|
||||
exec g:_uspy "options = vim.eval(\"a:options\")"
|
||||
exec g:_uspy "UltiSnips_Manager.add_snippet(trigger, value, description, options, *args)"
|
||||
return ""
|
||||
endfunction
|
||||
|
||||
function! UltiSnips#AddSnippetWithPriority(trigger, value, description, options, filetype, priority)
|
||||
exec g:_uspy "trigger = vim.eval(\"a:trigger\")"
|
||||
exec g:_uspy "value = vim.eval(\"a:value\")"
|
||||
|
@ -46,47 +46,6 @@ command! -bang -nargs=? -complete=customlist,UltiSnips#FileTypeComplete UltiSnip
|
||||
|
||||
command! -nargs=1 UltiSnipsAddFiletypes :call UltiSnips#AddFiletypes(<q-args>)
|
||||
|
||||
" Backwards compatible functions. Prefer the ones in autoload/.
|
||||
function! UltiSnips_FileTypeChanged()
|
||||
echoerr "Deprecated UltiSnips_FileTypeChanged called. Please use UltiSnips#FileTypeChanged." | sleep 1
|
||||
return UltiSnips#FileTypeChanged()
|
||||
endfunction
|
||||
|
||||
function! UltiSnips_ExpandSnippet()
|
||||
echoerr "Deprecated UltiSnips_ExpandSnippet called. Please use UltiSnips#ExpandSnippet." | sleep 1
|
||||
return UltiSnips#ExpandSnippet()
|
||||
endfunction
|
||||
|
||||
function! UltiSnips_ExpandSnippetOrJump()
|
||||
echoerr "Deprecated UltiSnips_ExpandSnippetOrJump called. Please use UltiSnips#ExpandSnippetOrJump." | sleep 1
|
||||
return UltiSnips#ExpandSnippetOrJump()
|
||||
endfunction
|
||||
|
||||
function! UltiSnips_SnippetsInCurrentScope()
|
||||
echoerr "Deprecated UltiSnips_SnippetsInCurrentScope called. Please use UltiSnips#SnippetsInCurrentScope." | sleep 1
|
||||
return UltiSnips#SnippetsInCurrentScope()
|
||||
endfunction
|
||||
|
||||
function! UltiSnips_JumpBackwards()
|
||||
echoerr "Deprecated UltiSnips_JumpBackwards called. Please use UltiSnips#JumpBackwards." | sleep 1
|
||||
return UltiSnips#JumpBackwards()
|
||||
endfunction
|
||||
|
||||
function! UltiSnips_JumpForwards()
|
||||
echoerr "Deprecated UltiSnips_JumpForwards called. Please use UltiSnips#JumpForwards." | sleep 1
|
||||
return UltiSnips#JumpForwards()
|
||||
endfunction
|
||||
|
||||
function! UltiSnips_AddSnippet(...)
|
||||
echoerr "Deprecated UltiSnips_AddSnippet called. Please use UltiSnips#AddSnippetWithPriority." | sleep 1
|
||||
return call(function('UltiSnips#AddSnippet'), a:000)
|
||||
endfunction
|
||||
|
||||
function! UltiSnips_Anon(...)
|
||||
echoerr "Deprecated UltiSnips_Anon called. Please use UltiSnips#Anon." | sleep 1
|
||||
return call(function('UltiSnips#Anon'), a:000)
|
||||
endfunction
|
||||
|
||||
augroup UltiSnips
|
||||
au!
|
||||
au CursorMovedI * call UltiSnips#CursorMoved()
|
||||
|
Loading…
Reference in New Issue
Block a user