Mercurial > vim
comparison runtime/filetype.vim @ 482:6f8b578776ab v7.0131
updated for version 7.0131
author | vimboss |
---|---|
date | Tue, 16 Aug 2005 23:01:50 +0000 |
parents | 66080ac5dab7 |
children | f012c4ed8c38 |
comparison
equal
deleted
inserted
replaced
481:66080ac5dab7 | 482:6f8b578776ab |
---|---|
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 Aug 15 | 4 " Last Change: 2005 Aug 16 |
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 |
1831 au BufNewFile,BufRead *.y call s:FTy() | 1831 au BufNewFile,BufRead *.y call s:FTy() |
1832 | 1832 |
1833 fun! s:FTy() | 1833 fun! s:FTy() |
1834 let n = 1 | 1834 let n = 1 |
1835 while n < 10 && n < line("$") | 1835 while n < 10 && n < line("$") |
1836 if getline(n) =~ '^\s*\(#\|class\>\)' | 1836 if getline(n) =~ '^\s*\(#\|class\>\)' && getline(n) !~ '^\s*#\s*include' |
1837 setf racc | 1837 setf racc |
1838 return | 1838 return |
1839 endif | 1839 endif |
1840 let n = n + 1 | 1840 let n = n + 1 |
1841 endwhile | 1841 endwhile |