When I open a PHP file that contains a class, how can I have Vim automatically fold the document up like this?:
Perhaps you want to set your 'foldmethod' option to "syntax"?
If this works as desired, you can put that command in
Edit: I realized that you may want the class declaration not to be folded by default. To do so, try:
I think that this combination should work:
You might need to adjust the value of
If you only want the functions themselves to be collapsed (and not any blocks within them), you may also want to adjust the value of