Add UltiSnipsFileType augroup and unset it if UltiSnips is disabled

This commit is contained in:
Daniel Hahler 2014-04-09 19:31:00 +02:00
parent 3208654c4e
commit 7da9dbe2af
2 changed files with 9 additions and 2 deletions

View File

@ -16,10 +16,14 @@ endfunction
call UltiSnips#bootstrap#Bootstrap()
if !exists("g:_uspy")
" Delete the autocommands defined in plugin/UltiSnips.vim.
" Delete the autocommands defined in plugin/UltiSnips.vim and
" ftdetect/UltiSnips.vim.
augroup UltiSnips
au!
augroup END
augroup UltiSnipsFileType
au!
augroup END
finish
end

View File

@ -1,5 +1,8 @@
" This has to be called before ftplugins are loaded. Therefore
" it is here in ftdetect though it maybe shouldn't
if has("autocmd")
autocmd FileType * call UltiSnips#FileTypeChanged()
augroup UltiSnipsFileType
au!
autocmd FileType * call UltiSnips#FileTypeChanged()
augroup END
endif