in Uncategorized

What does your .vimrc look like for editing PHP

I always use vim when editing PHP files… but, I don’t have a good .vimrc.

About the only thing I have is the completion dictionary; provided by Rasmus:
http://lerdorf.com/funclist.txt

or (as Wez stated), wget ‘http://viewcvs.php.net/viewcvs.cgi/*checkout*/phpdoc/funclist.txt’ -O php-funclist.txt

cat php-funclist.txt.new php-lang-constructs.txt | egrep -v ‘^#’ | sort | uniq > php-funclist.txt

that php-lang-constructs.txt has this in it:
# language constructs for completion, not found in the regular funclist
echo
print
foreach
list
new
As, well as the PEAR coding standards:
set tabstop=4
set shiftwidth=4

Also, I show the line numbers by default:
set number

I was thinking about adding SVN Commit and maybe PHP parser check with ‘!php -l %’

So, I guess what I am asking is if you use vim could you share your .vimrc