Why not to use 'marker' as folding method?

:set foldmethod=marker


I always use it.

If you want to fold regular function (or any other block), simply add
appropiate folding markers by, for example, visually selecting it and
typing 'zf' in normal mode.

I don't like to have folds for every syntactic construct anyway.

Syntax based folding, for me, is only useful when editing third party
code which I cannot (or don't want to) alter coding style even for
only adding folding markers.



2012/4/12 André Rodier <[email protected]>:
> No One can help me?
>
> Regards,
> André
>
> On 12 April 2012 07:56, André Rodier <[email protected]> wrote:
>> Hello everybody,
>>
>> I am using vim for web sites development, especially in PHP.
>>
>> I am happy so far with the PHP code folding by default,probably the
>> syntax method.
>>
>> When I have a big php class with a lot of methods, I like to organise
>> the code by "sections", what is now in C# as "regions". The final
>> result is easier to read and maintain. Exemple for a controller in
>> codeigniter.
>>
>> I could use comments like /* {{{ */ but I prefer to use #regions /
>> #endregions, as it's viewed as comments by PHP.
>>
>> If us use marker for the folding method, it's working, and I have a
>> beautiful thing like that :-) :
>>
>> class UserController
>> {
>>    [private members]
>>
>>    [Login / Logout]
>>
>>    [Registration]
>>
>>    [Password changing]
>>
>>    [Profile editing]
>> }
>>
>>
>> Please, can you tell me how to extend the folding options in the
>> syntax file, to be able to fold by regions, classes, method, etc.
>>
>> Best regards,
>> --
>> André
>
>
>
> --
> André Rodier
>
> --
> 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



-- 
Joan Miquel Torres__________________________________
Linux Registered User #164872
http://www.mallorcaweb.net/joanmiquel
BULMA: http://bulma.net http://breu.bulma.net/?l2301

-- 
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

Reply via email to