Skip to main content
Topic: Eclipse PDT (Read 3739 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Eclipse PDT

Although I don't really want to, I'm using Eclipse with PDT plugin for a project I'm working on. Everything seem fine except for the useless auto indentation. Not being used to it, it really throws me off while I'm typing and the feature not working correctly, at least according to my style, makes it even worse. So I have been trying to find a way to disable the auto indentation completely, unfortunately, to no avail. Any ideas about it?

Re: Eclipse PDT

Reply #1

I have not used Eclipse but most IDE's have some form of formatting profile that follows some convention like PSR-2 or whatever.  They also allow you to define your own standard, so you should be able to do that?  I use netbeans and was able to define a formatting that suited my taste (of course it still does some "auto" things which annoy me to no end !)

Re: Eclipse PDT

Reply #2

I think in theory you should create a new formatter (window > preferences > PHP > formatter) and then remove the indentation (as much as possible).
But from what I can see it doesn't work. Not sure if it is a problem with my install or what...
Bugs creator.
Features destroyer.
Template killer.

Re: Eclipse PDT

Reply #3

Don't use Eclipse. Ever. Its editor features are FUBAR.

Or use eclim at least.

Re: Eclipse PDT

Reply #4

Quote from: Spuds – I have not used Eclipse but most IDE's have some form of formatting profile that follows some convention like PSR-2 or whatever.  They also allow you to define your own standard, so you should be able to do that?  I use netbeans and was able to define a formatting that suited my taste (of course it still does some "auto" things which annoy me to no end !)
The formatter, from my understanding, cleans things up once you close the file or something. I'm not sure if it directly affects typing. Java plugin seems to have more options for typing and even something closer to what I have but not the PHP plugin.

Quote from: emanuele – I think in theory you should create a new formatter (window > preferences > PHP > formatter) and then remove the indentation (as much as possible).
But from what I can see it doesn't work. Not sure if it is a problem with my install or what...
I had checked that too but it was the same here as well. However, there was this setting about arrays and changing that seems to have calmed things down a bit - my main problems were with the array syntax it was forcing. The rest is still annoying but I guess I can live with it for now.

Quote from: forumsearch0r2 – Don't use Eclipse. Ever. Its editor features are FUBAR.

Or use eclim at least.
As I said, I'm not really happy with it, but I have to use it. If I could choose, it would be Notepad. Having directory find/replace with regex option, which comes in very handy in some cases, and code highlighting, which makes things easier for the eye, are the only reason I use Dreamweaver, with almost everything else disabled.

Re: Eclipse PDT

Reply #5

I could never go back to a basic editor. It's too hard and time consuming to track things down.

Re: Eclipse PDT

Reply #6

I have always worked on smaller codebases I was very familiar with, so never felt the need for the editor to think for me. Now that I'm working on bigger, unfamiliar projects, I can understand why people may want to use IDEs.

Re: Eclipse PDT

Reply #7

Quote from: groundup – I could never go back to a basic editor. It's too hard and time consuming to track things down.
That's a difficult balance for me: I like very simple editors (I use Kate in my day to day breaking of working on Elk and similar code), I used IDE in the past (mainly visual studio), and I tend to like some of the things they do, though I also get bored quickly when the IDEs start trying to be smarter than they actually are and try to put around code or formatting I don't want... :-\
And I'm too lazy to think to configure them. :P
Bugs creator.
Features destroyer.
Template killer.

Re: Eclipse PDT

Reply #8

Configuring the code samples is really easy in Netbeans. Took me like 5 minutes (including the time to find it) to get it to what I wanted.