UltiSnips/ftdetect/UltiSnips.vim
Holger Rapp 6b12b11411 Only set autocommands when there are snippets.
This speeds up cursor movement when there is no snippet activated.

Fixes #518.
2015-07-11 17:11:04 +02:00

18 lines
444 B
VimL

" This has to be called before ftplugins are loaded. Therefore
" it is here in ftdetect though it maybe shouldn't
" This is necessary to prevent errors when using vim as a pager.
if exists("vimpager")
finish
endif
if has("autocmd")
augroup UltiSnipsFileType
autocmd!
autocmd FileType * call UltiSnips#FileTypeChanged()
augroup END
" restore 'filetypedetect' group declaration
augroup filetypedetect
endif