User forums > Using Code::Blocks
Automatic indentation
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
--- Quote ---class orario {
public:
int Ore();
int Minuti();
int Secondi();
private:
int sec;
};
--- End quote ---
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
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:
Yes, AStyle (I think).
The 11th plague of Egypt:
I can't find a valid download link, maybe it's dead.
Navigation
[0] Message Index
[#] Next page
Go to full version