NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[done] Code Folding for switch case break


Joined: 19 Oct 2007
Posts: 4
Reply with quote
The code folding in 5.2 is an improvement but code folding for switch that folds each 'case' would be a great improvement for me.

example:

Code:

switch($value){

   //Comment
   case 1:
      //Do something here
   break;

    //Comment
   case 2:
      //Do something here
   break;

    //Comment
   default:
      //Do something here
   break;
}


Ideally This should fold to something like this:

Code:

switch($value){

    //Comment
   case 1:
+     {...}
   
   //Comment
   case 2:
+     {...}

    //Comment
   default:
+     {...}

}


I know there are no '{' or '}' in the case syntax but if there is a way of folding from the ':' after the 'case' to the 'break;' this would be great.

Fingers crossed for the next version Smile
View user's profileFind all posts by AlanHSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
if you add curly-brackets, you'll get what you want:


_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Oct 2007
Posts: 4
Reply with quote
Superb Smile
View user's profileFind all posts by AlanHSend private message
[done] Code Folding for switch case break
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic