Fixing Indentation [message #159133] |
Sun, 27 November 2005 14:02  |
Eclipse User |
|
|
|
Originally posted by: void.void.com
Hi,
since I imported my source code into Eclipse (I used to code with
Emacs), the indentations are all messed up. The Java plugin for Eclipse
has a very nice feature (as does Emacs) where you can just hit one key
and it will automagically indent the selected region properly.
Can I do such a thing with CDT? I don't want to end up fixing
indentations for thousands of LOC myself.
Thanks in advance,
Matthias
|
|
|
|
Re: Fixing Indentation [message #159209 is a reply to message #159171] |
Mon, 28 November 2005 10:50  |
Eclipse User |
|
|
|
Originally posted by: void.void.com
Burak wrote:
> Hope it helps,
Very much so, thanks.
I think I'll write a script and use astyle and just replace all tabs
with spaces; that'll do the job. From there on I can do the formatting
myself :)
The CDT plugin doesn't support the Stroustrup C++ style which is my
favourite, and generally seems to be more focused on C than on C++ and
thus isn't very attractive to me.
It also acts pretty stupid in certain situations. For example, if I want
to fix indentation only for a certain block of code inside a function
body, the formatter will align it to column 0. ^^
Regards,
Matthias
PS: It's CTRL+/SHIFT/+F which calls the formatter by the way 8)
|
|
|
Powered by
FUDForum. Page generated in 0.03350 seconds