Mercurial > vim
comparison runtime/filetype.vim @ 532:7052f11a3dc9
updated for version 7.0150
author | vimboss |
---|---|
date | Sun, 25 Sep 2005 22:16:38 +0000 |
parents | da9142bd190a |
children | a5efb97bc104 |
comparison
equal
deleted
inserted
replaced
531:da9142bd190a | 532:7052f11a3dc9 |
---|---|
1 " Vim support file to detect file types | 1 " Vim support file to detect file types |
2 " | 2 " |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | 3 " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 " Last Change: 2005 Sep 19 | 4 " Last Change: 2005 Sep 25 |
5 | 5 |
6 " Listen very carefully, I will say this only once | 6 " Listen very carefully, I will say this only once |
7 if exists("did_load_filetypes") | 7 if exists("did_load_filetypes") |
8 finish | 8 finish |
9 endif | 9 endif |
14 set cpo&vim | 14 set cpo&vim |
15 | 15 |
16 augroup filetypedetect | 16 augroup filetypedetect |
17 | 17 |
18 " Ignored extensions | 18 " Ignored extensions |
19 au BufNewFile,BufRead *.orig,*.bak,*.old,*.new,*.rpmsave,*.rpmnew | 19 au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.rpmsave,?\+.rpmnew |
20 \ exe "doau filetypedetect BufRead " . expand("<afile>:r") | 20 \ exe "doau filetypedetect BufRead " . expand("<afile>:r") |
21 au BufNewFile,BufRead *~ | 21 au BufNewFile,BufRead *~ |
22 \ let s:name = expand("<afile>") | | 22 \ let s:name = expand("<afile>") | |
23 \ let s:short = substitute(s:name, '\~$', '', '') | | 23 \ let s:short = substitute(s:name, '\~$', '', '') | |
24 \ if s:name != s:short && s:short != "" | | 24 \ if s:name != s:short && s:short != "" | |
25 \ exe "doau filetypedetect BufRead " . s:short | | 25 \ exe "doau filetypedetect BufRead " . s:short | |
26 \ endif | | 26 \ endif | |
27 \ unlet s:name | | 27 \ unlet s:name | |
28 \ unlet s:short | 28 \ unlet s:short |
29 au BufNewFile,BufRead *.in | 29 au BufNewFile,BufRead ?\+.in |
30 \ if expand("<afile>:t") != "configure.in" | | 30 \ if expand("<afile>:t") != "configure.in" | |
31 \ exe "doau filetypedetect BufRead " . expand("<afile>:r") | | 31 \ exe "doau filetypedetect BufRead " . expand("<afile>:r") | |
32 \ endif | 32 \ endif |
33 | 33 |
34 " Pattern used to match file names which should not be inspected. | 34 " Pattern used to match file names which should not be inspected. |