As a novice programmer, I have taken the habit to test alternative methods of code by commenting / uncommenting portion of my scripts code.
I have not found such options in AGS editor 3.2.1 (but I may have not search at the right place...)
Would it be possible to add a button in the right click menu that will comment selected lines of code (i.e. adding a // at the beginning of each line)? and of course the reverse option will be useful too!
Am I the only one that will use this option?
Thanks.
Not sure, why do you need a separate button, is the /* */ comment style not useful enough? Or you mean, this is wanted for faster work, or something like that?
On other hand, I can't argue that this might be handy...
VS has the shortcut Ctrl E - C for this and it is indeed very useful.
I will add it to my list of things to add.
If you end comment sections with /**/ then you can comment/uncomment by placing/removing /* where the comment is to begin.
/*
Commented-out code Here
/**/
Running code Here
/**/
That's slick RickJ
Ctrl-/ in... Eclipse, I guess. That always made sense to me.
Quote from: Crimson Wizardis the /* */ comment style not useful enough?
Hey, I did not known that! Thanks for this magical tip, Mr Crimson Wizard!
Now I feel stupid to ask for something already implemented (the ability to quick comment large number of lines)... :-[
Sorry about that.
Quote from: Calin LeafshadeI will add it to my list of things to add.
That will be nice. But when you now the /* */, a button / keyboard shortcut is less necessary.
Is this /* */ notation mention somewhere in the manual? I can't find it in scripting tutorial.
Quote from: Billbis on Wed 06/03/2013 07:34:16
Quote from: Crimson Wizardis the /* */ comment style not useful enough?
Hey, I did not known that! Thanks for this magical tip, Mr Crimson Wizard!
Now I feel stupid to ask for something already implemented (the ability to quick comment large number of lines)... :-[
Sorry about that.
Well, no need to feel stupid or sorry!
BTW, I can't see this in manual :-/. Guess this info was missed.
I use this:
//*
code
code
code
//*/
/*
code
code
code
//*/
That way you can keep the start of the comment block when the code is active.
At work I use the VS feature Calin has mentioned (though I use the button because I fail to remember shortcuts). It is very useful and I prefer it over the /**/