aboutsummaryrefslogtreecommitdiff
path: root/vim.dot.link/filetype.vim
blob: 5513aa17a8a28ded4ba96f7986fa18f34d722b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
" Vim support file to detect file types

if exists("did_load_filetypes")
  finish
endif

" Filetype detection
"
" According to ":help BufRead", this augroup is also evaluated also on
" ":filetype detect".
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
  autocmd BufRead,BufNewFile *.mdwn      setfiletype markdown
  autocmd BufRead,BufNewFile *.md        setfiletype markdown
  autocmd BufRead,BufNewFile *.py        setfiletype python
  autocmd BufRead,BufNewFile *.pp        setfiletype puppet
  autocmd BufRead,BufNewFile *.php       setfiletype php
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