Source code formatter

General questions regarding the usage of CodeLite
katia
CodeLite Enthusiast
Posts: 11
Joined: Thu Aug 07, 2008 3:23 pm
Contact:

Source code formatter

Post by katia »

Hello,
Congratulations for your work!Great IDE with many capabilities!
The source code formatting is quite satisfying but the option "Fill Empty Lines" doesn't seem to work.
There is no change.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Source code formatter

Post by eranif »

katia wrote:Congratulations for your work!Great IDE with many capabilities!
Thanks
katia wrote:he source code formatting is quite satisfying but the option "Fill Empty Lines" doesn't seem to work.
Actually it does. depends what were you expecting it to do.

From the Astyle manual (the soruce code formatter is based on the ASyle code):
-E,--fill-empty-lines
Fill empty lines with the white space of their previous lines.
It actually adds the previous line whitespace, so if you have an empty line, it will prepend a whitespace character to it according to what set in the previous line. To see that it actually does that, enable whitespace visualisation from: Settings -> Editor -> Whitespaces visibility' and select it to 'always'

Format a file with and without this flag enabled and see the differences

Eran
Make sure you have read the HOW TO POST thread
katia
CodeLite Enthusiast
Posts: 11
Joined: Thu Aug 07, 2008 3:23 pm
Contact:

Re: Source code formatter

Post by katia »

Yes, I saw the difference.
I expected something else...
Also, could you tell me what is the functionality of the option "One Line Keep Blocks"?
Thanks
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Source code formatter

Post by eranif »

To see a complete list of the formatter functionality, see here:

http://astyle.sourceforge.net/astyle.html

Eran
Make sure you have read the HOW TO POST thread
Post Reply