NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
newbie: how to indent code in phped


Joined: 03 Sep 2008
Posts: 1
Reply with quote
In zend studio for eclipse, I indent code by pressing
Ctrl+Shif+F.
How can I do that in phped.
If I click indent code in dit menu, it only insert a tab, not what I want.
Thanks
View user's profileFind all posts by vuthecuongSend private message


Joined: 20 Nov 2007
Posts: 14
Reply with quote
When I click Indent Code in the Edit menu without selecting anything, it indents the current line, regardless of where the cursor is on that line. If I select one or more lines, it indents all of those lines (even if the first or last is only partially selected).

You can control whether it uses tabs or spaces via the Editor Settings panel, as well as the number of spaces to use. You can also control some of the indentation behavior by choosing between smart indent mode, auto indent mode, or none, and setting or clearing the smart tabs setting. You can assign keystrokes to this via the Editor Shortcuts panel. You can also use the indent and outdent buttons on the editor toolbar.

If by indent you mean an intelligent reformat of a region of code, PhpED doesn't do that directly but does have hooks for running either PHP Beautify or Polystyle over entire files. Keep in mind that not everyone will be familiar with other tools, so simply saying that you want it to indent the same way as Zend studio won't tell others what you mean.
View user's profileFind all posts by garyfxSend private message


Joined: 10 Feb 2007
Posts: 48
Reply with quote
If all else fails there is Polystyle Lite, which comes with PhpED. The $30 for the full Polystyle program is definitely worth it.
View user's profileFind all posts by StorymanSend private message
newbie: how to indent code in phped
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