Here my vim Settings.

# ~/.vimrc
set ignorecase
set tabstop=2
set shiftwidth=2
set autoindent
set expandtab
imap <c-space> <c-x><c-o>
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType css set omnifunc=csscomplete#CompleteCSS

http://shang-liang.com/blog/using-vim-as-actionscript-editor/