User forums > Using Code::Blocks
Quick new C++ file (small question)
cyanide911:
Currently it's a long process - File->New->File->C/C++ source->C++->Filename.
Is there way to simply open an Untitledx.cpp file with a single/fewer clicks, and then specify the filename while saving it? (or a similar shorter method)
zabzonk:
I just right-click on the relevant directory in the Workspace tree and select Add Files... This pops up the standard Windows file open dialog, which allows you to create new files from its context menu. Of course, this doesn't allow you to use CB templates, but I've never liked that feature in any IDE I've used.
Jenna:
--- Quote from: zabzonk on November 16, 2009, 08:41:16 pm ---I just right-click on the relevant directory in the Workspace tree and select Add Files... This pops up the standard Windows file open dialog, which allows you to create new files from its context menu. Of course, this doesn't allow you to use CB templates, but I've never liked that feature in any IDE I've used.
--- End quote ---
Does not work on linux (at least not in xfce).
What about using ctrl+shift+n, answering the popup-dialog with yes and type a name, or if it should not be added to a project, click no and save with ctrl+s, type a name and that's it.
Radek:
I add an empty file and then I write my code. Then I save the file with the .cpp extension. This seems to work, at least I haven't seen any misunderstandings. Perhaps, the online parser guess the file contents form "signals", like #include, #ifdef, typical syntax constructs and so on.
cyanide911:
Yeah, but the problem with writing the code in an empty file (without .cpp extension) is syntax highlighting. CodeBlocks will hilight the syntax only if it know that I'm making a C++ file.
@Jens: CtrlShiftN opens an empty file without any popup for the file name.
Navigation
[0] Message Index
[#] Next page
Go to full version