Code::Blocks Forums

User forums => Help => Topic started by: bolevole on October 01, 2017, 11:22:54 pm

Title: Codeblocks does not auto indent when Enter key is pressed (On Fedora 26)
Post by: bolevole on October 01, 2017, 11:22:54 pm
Looks like this is old issue: http://forums.codeblocks.org/index.php?topic=19988.0 (http://forums.codeblocks.org/index.php?topic=19988.0)

Example:
Code
int main()
{//Cursor here

After pressing Enter:
Code
int main()
{
//Cursor here

Should be:
Code
int main()
{
    //Cursor here

Package is from official repo
Problem does not happen with svn 11146 on Ubuntu 17.04
Problem does not happen with codeblocks 16.01 installed from repo (Ubuntu 17.04)

Settings in Editor->General Setting->Indent Options are the same in all three cases

It is kinda annoying since I am used to auto indent
Title: Re: Codeblocks does not auto indent when Enter key is pressed (On Fedora 26)
Post by: Jenna on October 01, 2017, 11:41:26 pm
Are you sure it's from RPMFusion ?
I do not find it there.

Your example (one curly brace and cursor after it) works for me as you expect it.
The example from the old thread you linked to (two curly braces and the cursor between both), does not work.
But the autocompletion (type the left brace and get both and the cursor placed with indentation in the line between them, like ollydbg's example) works fine here.

Code::Blocks from my copr (see signature).
Title: Re: Codeblocks does not auto indent when Enter key is pressed (On Fedora 26)
Post by: bolevole on October 01, 2017, 11:59:24 pm
Are you sure it's from RPMFusion ?
I do not find it there.

Your example (one curly brace and cursor after it) works for me as you expect it.
The example from the old thread you linked to (two curly braces and the cursor between both), does not work.
But the autocompletion (type the left brace and get both and the cursor placed with indentation in the line between them, like ollydbg's example) works fine here.

Code::Blocks from my copr (see signature).

You are right, for some reason could not install it first time so I installed rpmfusion packages then codeblocks, probably mistyped.
It is from official repo
I linked post because first problem is similar to mine(two curly braces)

Title: Re: Codeblocks does not auto indent when Enter key is pressed (On Fedora 26)
Post by: Jenna on October 02, 2017, 06:49:05 am
Official repo has 16.01, can you try a nightly build from my copr and see if it works better ?
Title: Re: Codeblocks does not auto indent when Enter key is pressed (On Fedora 26)
Post by: bolevole on October 03, 2017, 05:23:32 pm
Official repo has 16.01, can you try a nightly build from my copr and see if it works better ?

Well problem still exists, I installed from your copr rev. 11146
I should note that fedora 26 is running inside VirtualBox
Title: Re: Codeblocks does not auto indent when Enter key is pressed (On Fedora 26)
Post by: oBFusCATed on October 03, 2017, 07:48:47 pm
Do you have the smart indent plugins installed? They are part of the contrib plugins package.
Title: Re: Codeblocks does not auto indent when Enter key is pressed (On Fedora 26)
Post by: bolevole on October 03, 2017, 10:03:17 pm
Do you have the smart indent plugins installed? They are part of the contrib plugins package.

That fixed the issue, for some reason it was not installed along with main package, thank you