aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/filetype.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/vim/filetype.vim b/vim/filetype.vim
index c259c43f..3cd2b203 100644
--- a/vim/filetype.vim
+++ b/vim/filetype.vim
@@ -1,13 +1,17 @@
-" Override filetypes.vim
+" Override system filetype.vim
if exists('g:did_load_filetypes')
finish
endif
let g:did_load_filetypes = 1
+
+" If we don't have +autocmd or are 'compatible', do nothing, and don't try
+" again later
if !has('autocmd') || &compatible
finish
endif
-" Run the 'filetypedetect' group on a file with its extension stripped off
+" Helper function to run the 'filetypedetect' group on a file with its
+" extension stripped off
function! s:StripRepeat()
" Check we have the fnameescape() function