" PHP manual {
autocmd BufNewFile,Bufread *.ros,*.inc,*.php set keywordprg="help"
"vim启动help命令时会去runtimepath目录下doc/tags文件中查找关键字
"需要下载 PHP manual放置runtimepath目录,按 K 键访问光标下字符的帮助内容
set runtimepath+=/home/sunny/.vim/runtimepath
"}
" phpcs (need install phpcs command) {
function! RunPhpcs()
let l:filename=@%
"let l:phpcs_output=system('phpcs --report=csv --standard=YMC '.l:filename)
let l:phpcs_output=system('/usr/bin/phpcs '.l:filename)
echo l:phpcs_output
"let l:phpcs_list=split(l:phpcs_output, "\n")
"unlet l:phpcs_list[0]
"cexpr l:phpcs_list
"cwindow
endfunction
set errorformat+=\"%f\"\\,%l\\,%c\\,%t%*[a-zA-Z]\\,\"%m\"
command! Phpcs execute RunPhpcs()
" Now you can run a Codesniff for the current file via :Phpcs
"}
" PHP Code style{
setl expandtab
setl tabstop=4
setl shiftwidth=4
setl softtabstop=4
" delete space in the tail of line
autocmd BufWritePre * :%s/\s\+$//ge
"}
"PHP Code folding {
"值为 2 将折叠所有的 { 和 }
let php_folding = 1
"normal zO
"}