This is a simple question :
Is there any automatic indentation alignment on Eclipse PDT when you do a copy-paste ?
Because it doesn't work on my installation (raw copy-paste), but maybe this is because I use tabs instead of spaces, so I want to know if it will work if I switch to spaces.
Thanks
Actually, such a function exists now for eclipse CDT. In preferences : C++ -> Editor -> Typing, "when pasting", "adjust indentation".
Perhaps it is the same for PDT ?
I don't know specifically about PDT, but normally you can indent code with Ctrl + i
, and format code with Ctrl + Shift + f
(under Preferences -> Java -> Code Style -> Formatter
you can specify how the formatter should work).
You can even select multiple files in the navigator and select Source -> Format
to format several files then.
Tony Vermeiren had a suggestion that worked for me (from https://bugs.eclipse.org/bugs/show_bug.cgi?id=351771#c17)
open workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.php.ui.prefs
add "smartPaste=false" at the end
save & restart eclipse
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With