NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Code folding for switch operator + keeping PhpED settings


Joined: 28 Mar 2007
Posts: 53
Reply with quote
Hello,

I would like to ask to add one advanced option to code folding. It is great that I can fold logical ‘if’ operator but it will be even better if I will be able to do the same with ‘switch case’ operator. I will suggest you to hide all code from one case till another one (because it will be difficult to identify the logical end of case operator, even more there could be several logical ends). For example the original code without code folding:
Code:
switch ($variable) {
  case 1:
    //some operations will go here
    break;
  case 2:
    //some operations will go here
    break;
}

and with code folding option:
Code:
switch ($variable) {
  case 1:(...)
  case 2:(...)
}


and the second request is to keep the PhpED’s setting before each installation or make possible to upgrade. The new version comes every week that is great but it takes me hour to bring all personal settings back after each installation. For example ‘php.ini’ file or shortcut ‘Ctrl+Shift+I’ (in old version it was 'indent' and I use to use it for this purposes).

Thank you in advance and waiting for your replay
View user's profileFind all posts by DelphiSend private messageICQ Number
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
"case" is supported, what you need is surround your code parts with curly braces, like below:
Code:
switch ($variable) {
  case 1: {
    //some operations will go here
    break;
  }
  case 2: {
    //some operations will go here
    break;
  }
}


Quote:
and the second request is to keep the PhpED’s setting before each installation or make possible to upgrade

All settings are kept during upgrades and updates if you install into the same directory.
If you have any particular issue with settings and can replicate it, please contact NuSphere Support directly.

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


Joined: 28 Mar 2007
Posts: 53
Reply with quote
dmitri wrote:
"case" is supported, what you need is surround your code parts with curly braces, like below:

Thank you for giving one of the possible solution, although it is more general {} folding then peculiar "case" Smile (it will takes some time to get used to put all case code in {})

dmitri wrote:
All settings are kept during upgrades and updates if you install into the same directory.
If you have any particular issue with settings and can replicate it, please contact NuSphere Support directly.

I have just downloaded the latest version of PhpED and after installation the following PHP5's settings file was rewritten (the installation was in the same directory). C:\Program Files\nusphere\phped\php5\php.ini Of cause I can do backup of this file before any upgrade but sometimes I forgot. In this case I am loosing all my settings and I have to do it manually. Should I create new topic in bug report section?

As for the PhpED's editors shortcuts everything seems to be OK. May be it is my mistake or it is fixed in new versions

With best regards

Vitali
View user's profileFind all posts by DelphiSend private messageICQ Number
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
You are correct, php settings in php.ini are preseved under php.ini-bak file and if you need, you can always restore this file.
On the other hand, the installer could ask if "overwrite" is what user wants. Seems it's a trivial fix.


Last edited by dmitri on Tue Dec 04, 2007 1:52 pm; edited 1 time in total

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


Joined: 28 Mar 2007
Posts: 53
Reply with quote
dmitri wrote:
You are correct, php settings in php.ini are preseved under php.ini-bak file and if you need, you can always restore this file.
On the other hand, installer could ask if "overwrite" is what user wants. Seems it's a trivial fix.

Thank you very much. I have found this "php.ini-bak" file in the same directory. Now it is clear how I can restore my setting back in case of emergency.
View user's profileFind all posts by DelphiSend private messageICQ Number
Code folding for switch operator + keeping PhpED settings
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