Fold/Collapse and expand (.c .cpp .java etc) Code, XML, Json, Store Procedure, Queries in Vi /Vim

:set fdm=syntax           or             set foldmethod=syntax

:set fdm=indent           or             set foldmethod=indent

Open Fold -zo, Open All Fold-zO, Close Fold-zc, Close All Fold-zC

  


Steps

 Command & Output

1

 $ vim <filename> 


2

 : set fdm=syntax


 

3

 


4

 Open fold   zo             zO --> Open all folds

5

 

6

 Fold Close-   zc          Close All Fold -zC

7

 

8

 



Your Comments /Suggestions & Questions are always welcome. 
We would like to help you with best of our knowledge. 
So feel free to put Questions.  

No comments:

Post a Comment