Quantcast

Maximum PC

It is currently Wed Aug 20, 2014 2:07 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: PHP editor with autoformatting?
PostPosted: Wed Oct 06, 2010 6:03 pm 
Northwood
Northwood
User avatar

Joined: Mon Sep 17, 2007 1:27 pm
Posts: 3311
Location: Toronto, ON
Does anyone know of a PHP editor with great auto-formatting? I've been using Netbeans, but its really slow. Thanks!


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Thu Oct 14, 2010 5:38 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Well, since known of the PHP devs have answered, I'm going to state an obvious excellent choice for any language.

Learn Emacs.

That should be a programming commandment.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Fri Oct 15, 2010 7:51 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Gadget wrote:
Well, since known of the PHP devs have answered, I'm going to state an obvious excellent choice for any language.

Learn Emacs.

That should be a programming commandment.


You hate people don't you? :)


Try Eclipse?


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Wed Oct 20, 2010 7:27 am 
8086
8086

Joined: Fri Apr 24, 2009 7:57 pm
Posts: 4
I don't know jack and I'm using Notepad ++. Is there a better editor?


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Wed Oct 20, 2010 8:09 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Notepad++ is amazing. I use it every day and I am a .NET / Visual Studio guy... so take that for what it is worth.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Wed Oct 20, 2010 6:35 pm 
8086
8086

Joined: Fri Apr 24, 2009 7:57 pm
Posts: 4
I like the vote of confidence. I've really grown to like using it.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Fri Oct 22, 2010 6:36 pm 
Northwood
Northwood
User avatar

Joined: Mon Sep 17, 2007 1:27 pm
Posts: 3311
Location: Toronto, ON
Notepad++ doesn't autoformat though. And Eclipse sort of does, but Netbeans does it way better.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Sat Oct 23, 2010 2:43 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
CrashTECH wrote:
Gadget wrote:
Well, since known of the PHP devs have answered, I'm going to state an obvious excellent choice for any language.

Learn Emacs.

That should be a programming commandment.


You hate people don't you? :)

Actually, I love people which is why I suggested Emacs. You don't need to spend a significant portion of your life learning 18 different little editors for uncommon file formats and languages (where uncommon is not your normal work) because Emacs has a major or minor mode for damn near every file type on earth. Sure, use NetBeans or VS for your daily Java or C# programming, but for a one off assignment, having Emacs in your tool belt is a damn good idea. If you just can't see giving up using a mouse, then grab a copy of XEmacs instead.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Mon Oct 25, 2010 5:59 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Emacs is the devil.

at least be sort of human and use vi if you have to do that. gVim is nice. Not going to lie. My 3rd co-op session I had to deal with a bunch of classic ASP pages. I used gVim 6.3 and whipped the shit out of that app.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Thu Oct 28, 2010 6:40 pm 
Northwood
Northwood
User avatar

Joined: Mon Sep 17, 2007 1:27 pm
Posts: 3311
Location: Toronto, ON
Neither gVim nor Emacs has auto formatting though (like indenting automatically).


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Fri Oct 29, 2010 4:38 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
You are better off... 8 times out of 10 it doesn't format it correctly.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Mon Nov 01, 2010 1:51 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
guoruiwu1994 wrote:
Neither gVim nor Emacs has auto formatting though (like indenting automatically).

Really? Are you sure really, really, sure about that one?

http://php-mode.sourceforge.net/php-mod ... ndentation
Quote:
5 Indentation

PHP mode's indentation settings inherit the defaults set by Emacs C mode, or the rules customized for C mode.4

PHP mode provides indentation settings that follow the PHP PEAR “Coding Standards”5. It has the consequence in PHP mode of making the indentation commands use four spaces, and not tabs. This setting is turned on whenever the file name associated with a buffer includes the string “PEAR”, case insensitive and the file ends in “.php”.


CrashTECH wrote:
You are better off... 8 times out of 10 it doesn't format it correctly.

Yeah... and how on earth would you know? Did MS implement a Emacs compatibility mode in VS?!


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Thu Nov 04, 2010 5:45 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Generalization about how auto-formatting works in general. At least it never looks the way I want it. No, is my way the correct way (hint, yes it is) that may be debatable :)


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Fri Nov 05, 2010 6:28 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
You do realize that you can get set the spacing in most editors, right?! =)

Actually, I've come across a few editors that seemed to do things in a strange manner. However, a lot of the finger pointing might better be pointed towards the language designer in those cases. For example, you never see any real disagreement on how to format Lisp (and the many derivatives) because the language syntax and grammar is dead simple. Take a fugly language like C++, which is notoriously difficult to parse, then you start to see all kinds of strange finger pointing.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Fri May 13, 2011 4:43 pm 
8086
8086

Joined: Fri May 13, 2011 10:52 am
Posts: 1
I’m actually trying to get to grips with Eclipse in my spare time, but spare time is rare time at the moment so I haven’t really dug that deep into it all. In this IDE I was used to pressing a single shortcut to move code braces and indents into the correct positioning.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Tue May 24, 2011 4:28 am 
8086
8086

Joined: Tue May 24, 2011 4:25 am
Posts: 1
I use free PHP IDE Codelobster PHP Edition.
It if fast porable PHP IDE with many usefull features and special plug-ing for the following frameworks:
Drupal CMS, Joomla CMS, Smarty, JQuery, CodeIgniter, Symfony, CakePHP and WordPress.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Mon May 30, 2011 7:28 pm 
Willamette
Willamette

Joined: Tue Feb 01, 2005 12:17 pm
Posts: 1479
I still use Notepad++ because I'm cheap and the syntax highlighting is good enough for me. Plus, I remember back in the day with Basic and C/C++ in DOS where auto-formatting wasn't really even available in many IDEs.... I remember using the early 1992-93 versions of the Borland Turbo C++ and Turbo Pascal compilers.... you had to do pretty much all formatting and structuring by hand.
Heck, I even still use regular Notepad in a pinch. I don't really have an actual IDE of choice that I use, though.

I guess maybe I'm still somewhat old fashioned in the way that I'm used not having auto-formatting text editors and am pretty much content with just a basic text editor and manual structuring/formatting by hand. A bit more work, but it does force you to structure your code and think about what you're doing a bit more., and to keep in mind HOW you're writing your code...


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Wed Jun 01, 2011 3:16 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
cbassett01 wrote:
but it does force you to structure your code and think about what you're doing a bit more., and to keep in mind HOW you're writing your code...
I totally disagree with this. Auto-formatting (or lack thereof) has zero effect on code quality in my experience. All auto-formatting and intellisense does is save me time.


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Wed Jun 08, 2011 3:39 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
CrashTECH wrote:
cbassett01 wrote:
but it does force you to structure your code and think about what you're doing a bit more., and to keep in mind HOW you're writing your code...
I totally disagree with this. Auto-formatting (or lack thereof) has zero effect on code quality in my experience. All auto-formatting and intellisense does is save me time.

Yeah, I don't see how formatting code by hand helps... that time can be spent on rewriting something in a more elegant manner or using a better algorithm. There is always something! =)

It does piss me off when autoformatters delete whitespace though. I think that a line of whitespace can help with code readability/maintainability; It is like a thought bubble in a comic strip or a paragraph in written language. Don't friggin delete my whitespace!


Top
  Profile  
 
 Post subject: Re: PHP editor with autoformatting?
PostPosted: Wed Jun 08, 2011 6:37 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Mine doesn't remove whitespace....

Resharper is amazing! Live code templates. Quick code generation and refactoring!


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 5 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group