isnt there any software/plugin to netbeans/eclipse that auto indent the whole code after i’ve inserted it?
not just indent when i press ENTER for new function.
i want to paste in a code for example without indents and it will auto indent everything automatically since it can recognize what language is used.
should save a lot of time.
In Zend Studio (and I guess in Eclipse with PDT as well), you can
right clickyour pasted document in the editor view and selectSourceFormat. Rules for source formatting are edited inWindowsPreferencesPHPCode StyleFormatter. You can select Code Conventions like PEAR or ZF there by default or invent your own.If you just want to indent some selected lines of code back and forth you select it and hit
tab(orshifttabto unindent). This will not resolve any nested code though. UseCtrlShiftFfor that (thanks to Paul Lammertsma for pointing that out).