" " initially setup by looking at " http://madism.org/~madcoder/dotfiles/vim/filetype.vim " if exists("did_load_filetypes") finish endif augroup filetypedetect au BufRead,BufNewFile COMMIT_EDITMSG setf gitcommit au BufRead,BufNewFile *tmp/{mad,}mutt{ng,}-*-* setf mail au BufRead,BufNewFile *.txt,README* setf txt au BufRead,BufNewFile *.mkd setf mkd au BufRead,BufNewFile ~/.blog/entries/* setf mkd au BufNewFile,BufRead *.stp setf stap " HTML (.shtml and .stm for server side) au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml() " Distinguish between HTML, XHTML and Django fun! s:FThtml() let n = 1 while n < 10 && n < line("$") if getline(n) =~ '' setf htmldjango return endif let n = n + 1 endwhile setf html endfun augroup END