if exists("did_load_filetypes") finish endif fun! FTCheck_dtml() let n = 1 if line("$") > 20 let nmax = 20 else let nmax = line("$") endif while n <= nmax if getline(n) =~? "[<&]dtml" setf dtml break endif let n = n + 1 endwhile endfun augroup filetypedetect au! BufRead,BufNewFile COMMIT_EDITMSG setfiletype git au! BufRead,BufNewFile svn-commit.* setfiletype svn au! BufRead,BufNewFile *.dtml setfiletype dtml au! BufRead,BufNewFile *.cover setfiletype pycover au! BufRead,BufNewFile /var/lib/buildbot/masters/*/*.cfg setfiletype python au! BufRead,BufNewFile * call FTCheck_dtml() augroup END