Author Topic: Automatic indentation  (Read 10337 times)

Offline The 11th plague of Egypt

  • Single posting newcomer
  • *
  • Posts: 8
Automatic indentation
« on: January 26, 2011, 11:51:20 am »
I'm a newb, so I may be doing something wrong. I'm trying to create a simple C++ program with a class in it.

-created a new console application
-created a new empty file, saved it as orario.h, and added it to the project
-created a new empty file, saved it as orario.cpp, and added it to the project

Well, actually I'm wondering why I can't create/rename/delete the file with a right click on the project.
I mean, there's no New > C++ file for example, do I have to create it on my HD before "adding it"?

Then I started typing. Highlighting works, indentation does not. Here's an example, totally flat
Quote
class orario {
public:
int Ore();
int Minuti();
int Secondi();

private:
int sec;
};

Netbeans would indent my code as I typed it, or all at once (select > right click > format)
Is there an option to activate this behaviour?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12129
    • Travis build status
Re: Automatic indentation
« Reply #1 on: January 26, 2011, 01:08:14 pm »
There is no automatic indentation (newer versions have something, thought), there is a tab key on you keyboard, use it  :lol:

What is the problems with the following scheme:
1. press ctrl+shift+n (it is the same as file -> new -> file...or something like that)
2. press yes in the save message
3. save the file
4. press yes in the add to project dialog
5. choose the targets and press ok
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline The 11th plague of Egypt

  • Single posting newcomer
  • *
  • Posts: 8
Re: Automatic indentation
« Reply #2 on: January 26, 2011, 02:36:23 pm »
Everything you get used enough to like becomes a problem once you can't have it anymore. :(

Isn't there some kind of plugin to format the code?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12129
    • Travis build status
Re: Automatic indentation
« Reply #3 on: January 26, 2011, 02:37:50 pm »
Yes, AStyle (I think).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline The 11th plague of Egypt

  • Single posting newcomer
  • *
  • Posts: 8
Re: Automatic indentation
« Reply #4 on: January 27, 2011, 05:48:54 pm »
I can't find a valid download link, maybe it's dead.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12129
    • Travis build status
Re: Automatic indentation
« Reply #5 on: January 27, 2011, 06:40:08 pm »
Do you have all plugins installed?
Looks like AStyle is core plugin, so it should be installed.
Please check if it is loaded in Plugins -> Manage...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline The 11th plague of Egypt

  • Single posting newcomer
  • *
  • Posts: 8
Re: Automatic indentation
« Reply #6 on: February 10, 2011, 11:27:23 am »
Sorry for the extra late response.

No, AStyle does not appear in the plugin list.

BTW How can I set -fno-elide-constructors in the compiling process? I searched under Project/Build options but it's not there

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12129
    • Travis build status
Re: Automatic indentation
« Reply #7 on: February 10, 2011, 10:56:57 pm »
OS version, C::B version?
Have you looked in plugins -> manage?

For the option - use project -> build options  ->  compiler -> other (if it is compiler option)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline rcttsoul

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Automatic indentation
« Reply #8 on: March 05, 2019, 10:08:41 am »
Another thing, this poor guy wanted to change his indent in Codeblocks, you can look above and see he had noithing but trolls giving him the run around, this forum should be monitored for this noinsenc3 and have these trolls muted for a few days with a warning.
Discord = Pryor#2941

Offline sodev

  • Regular
  • ***
  • Posts: 334
Re: Automatic indentation
« Reply #9 on: March 05, 2019, 06:29:18 pm »
Well, 8 years later... indentation does work now?

I don't know whats worse, trolling in the first place (was he?) or necroposting in the second (or trolling?)?