On 13/04/12 9:59 PM, André Rodier wrote:
Thanks for your answer,
Basically, I want to fold portions of code, encoded by #region /
#endregion blocks, but I don't want to loose the ability to fold
classes and methods as well.
This need is crucial when you have a class with 15-20 methods, and you
want to have an overview of the class on one screen.
Sorry for the slow reply
Try this in ~/.vim/after/syntax/php.vim or an appropriate autocommand:
syn region phpFoldRegion matchgroup=Comment
\ start="^\s*#region\>" end="^\s*#endregion\>"
\ transparent fold
\ contains=@phpClFunction,phpFoldFunction,phpSCKeyword
\ containedin=phpFoldClass
Cheers,
Ben.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php