diff --git a/autoload/UltiSnips.vim b/autoload/UltiSnips.vim index 55da863..4f1a381 100644 --- a/autoload/UltiSnips.vim +++ b/autoload/UltiSnips.vim @@ -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 diff --git a/ftdetect/UltiSnips.vim b/ftdetect/UltiSnips.vim index 9ec5b7b..e5df595 100644 --- a/ftdetect/UltiSnips.vim +++ b/ftdetect/UltiSnips.vim @@ -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