Keep empty lines

Post here any ideas/problems/suggestions you have regarding CodeLite's CodeFormatter (AStyle) plugin
Marc
CodeLite Curious
Posts: 4
Joined: Tue Jul 19, 2011 6:14 pm
Genuine User: Yes
IDE Question: C++
Contact:

Keep empty lines

Post by Marc »

Hello,

Is there a setting that will allow empty lines to NOT be deleted?

Thanks.

Marc
tjulian
CodeLite Enthusiast
Posts: 32
Joined: Tue Nov 11, 2008 12:06 am
Contact:

Re: Keep empty lines

Post by tjulian »

Look under Settings -> Global Editor Preferences -> General -> Save Options
Marc
CodeLite Curious
Posts: 4
Joined: Tue Jul 19, 2011 6:14 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Keep empty lines

Post by Marc »

Nope that is not the setting I was looking for.

If I have code as follows:

if(y ==5)
{

//Do magic...
y++;

}


And I format it to the style I've defined I end up with:

if(y ==5)
{
//Do magic...
y++;
}


The problem is I'd like to keep these blank lines.

Thanks.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Keep empty lines

Post by eranif »

The default options that comes with codelite's source code formatter does not remove those empty lines for me.
However, this may be a bug in the current version you are using - in trunk, I have upgraded codelite's the latest Astyle

Eran
Make sure you have read the HOW TO POST thread
Marc
CodeLite Curious
Posts: 4
Joined: Tue Jul 19, 2011 6:14 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Keep empty lines

Post by Marc »

What do your formatter settings look like?

Is there a pre-compiled binary for Windows of the main trunk?

Thanks
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Keep empty lines

Post by eranif »

PreDefined Style -> Linux
Custom -> blocks, preprocessors, break-else-if are enabled
Marc wrote:Is there a pre-compiled binary for Windows of the main trunk?
Nope, sorry

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