diff options
Diffstat (limited to 'runtime/filetype.vim')
-rw-r--r-- | runtime/filetype.vim | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index b2d34de0b..d8709d703 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2014 Feb 23 +" Last Change: 2014 Feb 26 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -673,22 +673,26 @@ au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif " Embedix Component Description au BufNewFile,BufRead *.ecd setf ecd -" Eiffel or Specman +" Eiffel or Specman or Euphoria au BufNewFile,BufRead *.e,*.E call s:FTe() " Elinks configuration au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf setf elinks func! s:FTe() - let n = 1 - while n < 100 && n < line("$") - if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$" - setf specman - return - endif - let n = n + 1 - endwhile - setf eiffel + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + else + let n = 1 + while n < 100 && n < line("$") + if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$" + setf specman + return + endif + let n = n + 1 + endwhile + setf eiffel + endif endfunc " ERicsson LANGuage; Yaws is erlang too @@ -1034,7 +1038,7 @@ au BufNewFile,BufRead *.ldif setf ldif au BufNewFile,BufRead *.ld setf ld " Lex -au BufNewFile,BufRead *.lex,*.l setf lex +au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex " Libao au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao @@ -2432,7 +2436,7 @@ au BufNewFile,BufRead *.xsd setf xsd au BufNewFile,BufRead *.xsl,*.xslt setf xslt " Yacc -au BufNewFile,BufRead *.yy setf yacc +au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc " Yacc or racc au BufNewFile,BufRead *.y call s:FTy() |