diff --git a/ftdetect/UltiSnips.vim b/ftdetect/UltiSnips.vim index 48844c6..0cabb07 100644 --- a/ftdetect/UltiSnips.vim +++ b/ftdetect/UltiSnips.vim @@ -1,10 +1,14 @@ " This has to be called before ftplugins are loaded. Therefore " it is here in ftdetect though it maybe shouldn't -if !exists("vimpager") - if has("autocmd") + +" This is necessary to prevent errors when using vim as a pager. +if exists("vimpager") + finish +endif + +if has("autocmd") augroup UltiSnipsFileType au! autocmd FileType * call UltiSnips#FileTypeChanged() augroup END - endif -endif +endif \ No newline at end of file