" Vim support file to detect file types if exists("did_load_filetypes") finish endif " Markdown augroup markdown " File extensions autocmd! autocmd BufRead,BufNewFile *.md setfiletype markdown autocmd BufRead,BufNewFile *.mkd setfiletype markdown autocmd BufRead,BufNewFile *.md setfiletype markdown autocmd BufRead,BufNewFile *.mdwn setfiletype ikiwiki " Markdown configuration " " Include folding setup: " https://github.com/masukomi/vim-markdown-folding " " Alternative folding method: " https://codereview.stackexchange.com/questions/202620/vim-plugin-for-folding-markdown-lists autocmd FileType markdown set foldexpr=NestedMarkdownFolds() autocmd FileType markdown set autoindent smartindent tabstop=2 softtabstop=2 shiftwidth=2 expandtab formatoptions=tcroqn2 comments=n:> augroup END " Python augroup python autocmd! autocmd BufRead *.py setfiletype python autocmd FileType python set autoindent smartindent tabstop=4 softtabstop=4 shiftwidth=4 expandtab augroup END " Puppet augroup puppet autocmd! autocmd BufRead,BufNewFile *.pp setfiletype puppet augroup END " Drupal *.module and *.install files. if has("autocmd") augroup module autocmd! autocmd BufRead,BufNewFile *.profile setfiletype php autocmd BufRead,BufNewFile *.module setfiletype php autocmd BufRead,BufNewFile *.install setfiletype php autocmd BufRead,BufNewFile *.test setfiletype php augroup END endif " Mail " " Workaround for mail editing. There must be a plugin enabling autoindent in " mail composition, which is annoying. augroup mail autocmd! autocmd FileType mail set noautoindent augroup END " Other filetypes augroup filetypedetect autocmd! autocmd BufRead,BufNewFile kvmxfile setfiletype sh autocmd BufRead,BufNewFile Vagrantfile setfiletype ruby autocmd BufRead,BufNewFile *.vue setfiletype html autocmd BufRead,BufNewFile *.thtml setfiletype php autocmd BufRead,BufNewFile *.rem setfiletype remind autocmd BufRead,BufNewFile *.trac setfiletype tracwiki autocmd BufRead,BufNewFile *.tracwiki setfiletype tracwiki augroup END