diff -uNr cream.orig/cream-autocmd.vim cream/cream-autocmd.vim --- cream.orig/cream-autocmd.vim 2004-08-21 16:22:19.000000000 +0200 +++ cream/cream-autocmd.vim 2004-08-21 16:24:35.045714424 +0200 @@ -158,7 +158,10 @@ " filetype and syntax highlighting " detect on VimEnter so dependencies can know filetype -autocmd VimEnter,BufEnter,FileType * call Cream_filetype() +autocmd VimEnter,BufEnter * call Cream_filetype() + +" add cream-specific improvements for some filetypes +autocmd FileType * call Cream_filetype_setup() " syntax highlighting (must follow filetype detection) autocmd VimEnter * call Cream_syntax_init() diff -uNr cream.orig/cream-filetype.vim cream/cream-filetype.vim --- cream.orig/cream-filetype.vim 2004-08-21 16:22:19.000000000 +0200 +++ cream/cream-filetype.vim 2004-08-21 16:27:55.590424568 +0200 @@ -32,7 +32,6 @@ " detect and set conditions based on filetype " o {argument} (optional) is filetype to set, otherwise detected - " set or detect if a:0 > 0 execute "set filetype=" . a:1 else @@ -43,13 +42,18 @@ set filetype=txt endif - " setup +endfunction + +function! Cream_filetype_setup() +" add cream-specific improvements to some filetypes +" this functions is called as an autocmd on the FileType event + if &filetype == "c" call Cream_source($CREAM . "cream-filetype-c.vim") endif if &filetype == "html" - \&& &filetype == "php" + \|| &filetype == "php" call Cream_source($CREAM . "cream-filetype-html.vim") endif