View | Details | Raw Unified
Collapse All | Expand All

(-) cream.orig/cream-autocmd.vim (-1 / +4 lines)
 Lines 158-164    Link Here 
" filetype and syntax highlighting
" filetype and syntax highlighting
" detect on VimEnter so dependencies can know filetype
" 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)
" syntax highlighting (must follow filetype detection)
autocmd VimEnter * call Cream_syntax_init()
autocmd VimEnter * call Cream_syntax_init()
(-) cream.orig/cream-filetype.vim (-3 / +7 lines)
 Lines 32-38    Link Here 
" detect and set conditions based on filetype
" detect and set conditions based on filetype
" o {argument} (optional) is filetype to set, otherwise detected
" o {argument} (optional) is filetype to set, otherwise detected
	" set or detect
	if a:0 > 0
	if a:0 > 0
		execute "set filetype=" . a:1
		execute "set filetype=" . a:1
	else
	else
 Lines 43-55    Link Here 
		set filetype=txt
		set filetype=txt
	endif
	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"
	if &filetype == "c"
		call Cream_source($CREAM . "cream-filetype-c.vim")
		call Cream_source($CREAM . "cream-filetype-c.vim")
	endif
	endif
	if &filetype == "html"
	if &filetype == "html"
	\&& &filetype == "php"
	\|| &filetype == "php"
		call Cream_source($CREAM . "cream-filetype-html.vim")
		call Cream_source($CREAM . "cream-filetype-html.vim")
	endif
	endif