News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Automatic indentation

Started by The 11th plague of Egypt, January 26, 2011, 11:51:20 AM

Previous topic - Next topic

The 11th plague of Egypt

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
Quoteclass 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?

oBFusCATed

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!]

The 11th plague of Egypt

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?

oBFusCATed

(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!]

The 11th plague of Egypt

I can't find a valid download link, maybe it's dead.

oBFusCATed

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!]

The 11th plague of Egypt

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

oBFusCATed

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!]

rcttsoul

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

sodev

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?)?