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 » Tue Jul 19, 2011 6:16 pm

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 » Wed Jul 20, 2011 4:32 pm

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 » Thu Jul 21, 2011 10:43 pm

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: 5812
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Keep empty lines

Post by eranif » Fri Jul 22, 2011 8:50 am

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 » Fri Jul 22, 2011 6:08 pm

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: 5812
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Keep empty lines

Post by eranif » Sat Jul 23, 2011 9:09 pm

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