" " 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 .gitsendemail.msg.* setf mail au BufRead,BufNewFile *.mkd,*.md,*.markdown setf mkd au BufRead,BufNewFile ~/.blog/entries/* setf mkd au BufNewFile,BufRead *.stp setf stap au BufRead,BufNewFile *.txt,README* setf txt " HTML (.shtml and .stm for server side) au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call s:FThtml() au BufNewFile,BufRead *.zu,*.zwt setf zimbu " 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