smart indentation

General questions regarding the usage of CodeLite
olafurb
CodeLite Curious
Posts: 4
Joined: Wed Jan 13, 2010 5:00 pm
Genuine User: Yes
IDE Question: c++
Contact:

smart indentation

Post by olafurb » Wed Jan 13, 2010 5:24 pm

I just started using Codelite and I think it's pretty great except for small pesky annoyances.

I am running revision 3584 on openSuSE 11.1

When smart indentation is enabled an extra indentation is added after I write a line that ends with a semi-colon and press enter.

void Class::ble( std::string fleh )
{
std::string str; <-- enter
[here is the caret]
}

I haven't been able to rectify this by fiddling around with the settings.
this is what I end up with
std::string bler;
bler = "adfasdf";
flflf->sdfdfyfy( asdfsdf );
if ( f3r3f3 )
{
bler = "dfefe";
}
else
{
bler = "fefef";
}

Does the source formatter have any say in this?

Best regards,
Ólafur Bergsson

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

Re: smart indentation

Post by eranif » Wed Jan 13, 2010 6:34 pm

Hi,

Please try to be more clear about the what do you expect, and what is the current behavior.

2 comments about posting here in the forum:
1) Use the pipe character '|' to indicate where do you expect the caret to be placed - it will be more clear
2) use the code tags to enclose code sections so it will be more readable

Also, there is an IRC channel #codelite at irc.freenode.net you might consider joining it for faster answher and some online help

Eran
Make sure you have read the HOW TO POST thread

olafurb
CodeLite Curious
Posts: 4
Joined: Wed Jan 13, 2010 5:00 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: smart indentation

Post by olafurb » Wed Jan 13, 2010 7:41 pm

Hey,

Sorry about the previous post ... I didn't notice that the formatting went hay-wire

Code: Select all

void Class::ble( std::string fleh )
{
    std::string str; // enter
        | //caret is indented one indent too many
}
I haven't been able to rectify this by fiddling around with the settings.
this is what I end up with when I type normally without correcting the smart indent

Code: Select all

    std::string bler;
        bler = "adfasdf";
        flflf->sdfdfyfy( asdfsdf );
        if ( f3r3f3 )
            {
                bler = "dfefe";
            }
            else
                {
                    bler = "fefef";
                }

olafurb
CodeLite Curious
Posts: 4
Joined: Wed Jan 13, 2010 5:00 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: smart indentation

Post by olafurb » Wed Jan 13, 2010 9:06 pm

I would like to add that I am using 4 spaces instead of tab

Best,
Olafur

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

Re: smart indentation

Post by eranif » Wed Jan 13, 2010 9:53 pm

Do you have your code enclosed inside braces?

Because codelite uses the current fold level to determine how much folding the code needs.

Maybe this approach needs to be revised

EDIT:
I fixed this issue in svn trunk it is now working as expected

Eran
Make sure you have read the HOW TO POST thread

olafurb
CodeLite Curious
Posts: 4
Joined: Wed Jan 13, 2010 5:00 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: smart indentation

Post by olafurb » Fri Jan 15, 2010 7:56 pm

This is great ...
When do you plan the next release which would include this fix?

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

Re: smart indentation

Post by eranif » Fri Jan 15, 2010 8:10 pm

Releases are often made at around the 20th of each month

Eran
Make sure you have read the HOW TO POST thread

Post Reply