Page 1 of 1

Custom code folding

Posted: Sat Jun 14, 2008 6:14 pm
by puya

I looked around but found nothing about such a feature : code folding
similar with VS's #region , basically defining custom code folding regions.
Is this feature already available and I missed it ? If no, do you think you could add this in a future version ?

Keep up the great work ...


Posted: Sat Jul 25, 2009 6:53 pm
by crp_spaeth
First of all thank you very very much for releasing a new Version of this genius ide plugin to make our daily a bit easier again.

+1 for the Idea of puya

I am realy missing this little feature... Since I am programming with the Extjs framework and my Classfiles become bigger and bigger it would be really nice to be able to define something like a nested Fold Syntax.

This would allow the developer to start a bundle blocks of Functions as for example eventhalnders, overwrides like:

Code: Select all

/* region Eventhandlers */
onClick : function(){
  // code...

onMouseOver : function(){
  // code...
/* endregion */ 

/* region Overwrites */
initComponent : function(){
 /* region Configs */
 this.examplePropertie = 'a value';
 Ext.apply(this, {
    title : 'a titlepropertie',
    width : 400,
    height : 450,
    // and many more confingproperties
 /* endregion */
 // code..
/* endregion */
Instead of scrolling through all those Functions to get toi the overwrites you could just fold those regions as you can do with coments.

The same thing with netsted regions this would be realy usefull for those big Ext.apply statements. Now you have to scroll through all your predefined configs of an extendet class to get to the actual code...

What do you think about that Idea (would make the life just another bit easier :) )
:lol: :lol: :lol: :lol:

Posted: Thu Aug 13, 2009 6:52 pm
by eric_suen
I have create a quick fix, please download file and replace the old one.

The default region tag is region and endregion, but you can change that in preferences "Spket -> Editors -> JavaScript Editor"

Posted: Fri Aug 14, 2009 3:54 am
by crp_spaeth

Posted: Wed Nov 04, 2009 11:53 am
by puya
Hey, thanks for the implementation, works like a charm...