aboutsummaryrefslogtreecommitdiff
path: root/.vim/filetype.vim
blob: dce60b74f76ae37e1a975bb805074a56fe64fa84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
if exists('did_load_filetypes')
    finish
endif

augroup filetypedetect
    autocmd BufRead,BufNewFile *.org setfiletype org
    autocmd BufRead,BufNewFile *nginx.conf setfiletype nginx
    autocmd BufRead,BufNewFile /etc/nginx*.conf setfiletype nginx
    autocmd BufRead,BufNewFile *mutt-* setfiletype mail

    autocmd BufRead,BufNewFile .vimspector.json 
                \   setfiletype vimspector
                \ | setlocal syntax=json
augroup end

autocmd FileType html setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType css setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2 expandtab