Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to collapse or expand source code in vim on HTML, PHP, etc?

EDIT: I know the basic folding command but what I need is something much more advance and intelligent such as in Visual Studio. I think it could not help without some really good plugin.

share|improve this question
    
For reference, the basic folding commands in vim are zf{motion} to create a fold, zo to open a fold, and zc to close a fold. –  Kristo Nov 21 '11 at 20:10

1 Answer 1

:help foldcolumn will tell you about how to create a small area left of the text that contains some controls to fold and unfold.

read about :help foldmethod about how to create folds automatically, eg. :set foldmethod=syntax.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.