-
Notifications
You must be signed in to change notification settings - Fork 0
/
filetype.vim
42 lines (38 loc) · 1.88 KB
/
filetype.vim
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
37
38
39
40
41
42
" filetype.vim
" CREATED: huyz 2001-07-13
augroup filetype
" Strip my filename extensions before figuring out the filetype
au BufNewFile,BufRead
\ *.ORIG,*.BAK,*.OLD,*.NEW,*.dist,*.DIST,*.dis,*.DIS,*.off,*OFF
\ exe "doau filetypedetect BufRead " . expand("<afile>:r")
" General (I didn't come up with these filenames)
au BufNewFile,BufRead .acrorc setf xdefaults
au BufNewFile,BufRead .perldb setf perl
au BufNewFile,BufRead .vip,.viper setf lisp
au BufNewFile,BufRead /*/Mail/DRAFTS/* setf mail|setlocal tw=0
au BufNewFile,BufRead /*/News/Score setf slrnsc
au BufNewFile,BufRead /*/jboss/conf/*/*.conf setf xml
au BufNewFile,BufRead *.jade setf jade
au BufNewFile,BufRead coc-settings.json set filetype=jsonc
au BufNewFile,BufRead *.less setf lesscss
au BufNewFile,BufRead *.mrc setf mhonarc
au BufNewFile,BufRead *.moin setf moin
au BufNewFile,BufRead *.wiki setf moin
" Approximate since actionscript not available
au BufNewFile,BufRead *.as setf javascript
au BufNewFile,BufRead mail-cap setf mailcap
au BufNewFile,BufRead /*/.spamassassin/user_prefs,/*/spamassassin/*.cf,/*/spamassassin/*.pre setf spamassassin
" My files (I came up with these filenames)
au BufNewFile,BufRead /*/.ssh/config.local setf sshconfig
au BufNewFile,BufRead procmailrc* setf procmail
au BufNewFile,BufRead tfrc* setf tf
au BufNewFile,BufRead screenrc* setf screen
au BufNewFile,BufRead .screenrc* setf screen
au BufNewFile,BufRead /*/.zfunc/* setf zsh
au BufNewFile,BufRead /*/.zshenv.cache/* setf zsh
au BufNewFile,BufRead .mailcap.* setf mailcap
au BufNewFile,BufRead pinerc.* setf pine
" This invented filetype works with vimspell and our ftplugin which sets
" the keywordprog
au BufNewFile,BufRead *.txt setf text
augroup END