|
|
" 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 |
|
|
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 |
| |