Mercurial > vim
comparison runtime/filetype.vim @ 3465:161d01cbb165
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 13 Apr 2012 23:04:47 +0200 |
parents | 4dde9b516e72 |
children | 3482d151136b |
comparison
equal
deleted
inserted
replaced
3464:d01eb8722b5a | 3465:161d01cbb165 |
---|---|
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: 2012 Apr 05 | 4 " Last Change: 2012 Apr 13 |
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 |
15 | 15 |
16 augroup filetypedetect | 16 augroup filetypedetect |
17 | 17 |
18 " Ignored extensions | 18 " Ignored extensions |
19 if exists("*fnameescape") | 19 if exists("*fnameescape") |
20 au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.rpmsave,?\+.rpmnew | 20 au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew |
21 \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) | 21 \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) |
22 au BufNewFile,BufRead *~ | 22 au BufNewFile,BufRead *~ |
23 \ let s:name = expand("<afile>") | | 23 \ let s:name = expand("<afile>") | |
24 \ let s:short = substitute(s:name, '\~$', '', '') | | 24 \ let s:short = substitute(s:name, '\~$', '', '') | |
25 \ if s:name != s:short && s:short != "" | | 25 \ if s:name != s:short && s:short != "" | |
237 else | 237 else |
238 exe "setf " . a:alt | 238 exe "setf " . a:alt |
239 endif | 239 endif |
240 endfunc | 240 endfunc |
241 | 241 |
242 " Visual Basic Script (close to Visual Basic) | 242 " Visual Basic Script (close to Visual Basic) or Visual Basic .NET |
243 au BufNewFile,BufRead *.vbs,*.dsm,*.ctl setf vb | 243 au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb |
244 | 244 |
245 " IBasic file (similar to QBasic) | 245 " IBasic file (similar to QBasic) |
246 au BufNewFile,BufRead *.iba,*.ibi setf ibasic | 246 au BufNewFile,BufRead *.iba,*.ibi setf ibasic |
247 | 247 |
248 " FreeBasic file (similar to QBasic) | 248 " FreeBasic file (similar to QBasic) |
733 | 733 |
734 " Gedcom | 734 " Gedcom |
735 au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom | 735 au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom |
736 | 736 |
737 " Git | 737 " Git |
738 au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit | 738 au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit |
739 au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig | 739 au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig |
740 au BufNewFile,BufRead git-rebase-todo setf gitrebase | 740 au BufNewFile,BufRead *.git/modules/**/COMMIT_EDITMSG setf gitcommit |
741 au BufNewFile,BufRead *.git/modules/**/config setf gitconfig | |
742 au BufNewFile,BufRead git-rebase-todo setf gitrebase | |
741 au BufNewFile,BufRead .msg.[0-9]* | 743 au BufNewFile,BufRead .msg.[0-9]* |
742 \ if getline(1) =~ '^From.*# This line is ignored.$' | | 744 \ if getline(1) =~ '^From.*# This line is ignored.$' | |
743 \ setf gitsendemail | | 745 \ setf gitsendemail | |
744 \ endif | 746 \ endif |
745 au BufNewFile,BufRead *.git/** | 747 au BufNewFile,BufRead *.git/** |