User forums > Using Code::Blocks

feature request

(1/1)

vongodric:
dunno if this is the right topic, but I have a small request: If I type: /** and press enter then sceleton of the documentation be automatically generated. Als in doc comment if a enter a new line (press enter) then automatically * would be added. Both eclipse ide and Zend Studio (for php) have this and I find it very nice feature. So it would be nice to have in C::B

vongodric:
Is it possible that this will be added?

MortenMacFly:

--- Quote from: vongodric on August 24, 2006, 09:11:19 am ---Is it possible that this will be added?

--- End quote ---
It isn't as easy as you may think. Keep in mind that C::B supports a wide range of compilers and languages. Only for C++ (and a few others) this makes sense. But not in general. So one would need to know if the current editor's file belongs e.g. to a C++ project and then trigger this "autocompletion".
Anyway: To have an abstract comment (as e.g. the header of a file) you can use abbreviations:
- go to settings - editor - abbreviations
- add an abbreviation, e.g. head
- in the code window just write the abtract header you would like to have, e.g.

--- Code: ---/**
 * Author:  MortenMacFly
 * Version:
 */

--- End code ---
- click ok
- open a file in the editor and type head
- press CTRL+J to do the abbreviation. done.

BTW: If you put a pipe-symbol ("|") just after "Version: " the cursor would be at this point after the abbreviation.

With regards, Morten.

vongodric:
yes it's a nice feature but not what I wanted.

But I don't think it's as hard as you make it to seem. basically if "enter" is pressed, you do 2 checks, if it's c/c++ document and then, if current style is comment_doc. If yes, add indentation, add * and one space too.

later it would be cool if I type: /** then c::b would check for what follows. if it's a function then add smth like:

--- Code: (cpp) ---/**
 * function name
 * |
 * @param ...
 * @return ...
 */
--- End code ---

Or maybe this could be added as a plugin?

Navigation

[0] Message Index

Go to full version