Author |
Topic |
|
gmit
Whole Tomato Software
Croatia
90 Posts |
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Sep 01 2006 : 2:20:43 PM
|
have you ever used this? i am wondering how it knows when to update the comment. the example shows a very "well defined" comment block.
if instead you have something like this:
/**
* @brief this is the short version
*
* here is where i put the much longer form of the comment
* but is the tool going to understand the specific formatting requirements
* of this doxygen formatted comment block?
**/
i know from the posts related to Document Method plus my own experience that C++ comments can use a LOT of different styles. |
zen is the art of being at one with the two'ness |
|
|
gmit
Whole Tomato Software
Croatia
90 Posts |
Posted - Sep 01 2006 : 2:39:38 PM
|
Sorry, but no - I only saw SlickEdit commercial on CodeProject and instantly fell in love with that feature.
I would expect for comments to be reformatted in realtime, as you type.
About the configuration, that's surely the part that would need a discussion. Comment style could be recognized (mainly, prefix from the current line should be propagated to new lines). About width... For example, there could be a global setting overrideable with something benign as: #define VA_AUTO_FORMAT_COMMENTS_WIDTH 80 which would allow per project/per file configurations.
|
|
|
tom_seddon
Tomato Guru
162 Posts |
Posted - Sep 02 2006 : 1:15:37 PM
|
There is a sample macro that comes with Visual Studio called "FillCommentParagraph". This word-wraps comments. It does not work as smoothly as vim, nor even as emacs, and it sometimes gets it a bit wrong, but it's better than nothing.
I only ever use it with // comments. I don't know what it would do with the /**/ variety. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Sep 03 2006 : 4:25:42 PM
|
yes, i remember seeing that macro now you mention it. i will put this on my list of things to dig out and have a look at when i get the time.
gmit read time reformatting of the comments is an interesting idea, but i suspect that this would be incredibly hard to do in the IDE, since plugin's are sneaking in and around behind the IDE's back. i have this vision of the edit commands being sent by the plugin clashing with the edit commands of the user. a reformat command after the fact makes a lot more sense. |
zen is the art of being at one with the two'ness |
|
|
mwb1100
Ketchup Master
82 Posts |
Posted - Nov 28 2006 : 4:43:59 PM
|
+1 on this request.
I would have purchased SlickEdit's add-in for the comment wrapping feature alone (it's amazing how intrusive formatting comments feels) except that it's for VS 2005 only...
VAX supporting VS6 through VS 2005 is a major plus for me, as I'm still doing much work in the VS 6 environment.
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Nov 29 2006 : 07:36:29 AM
|
Do you have any knowledge of or experience with VC6's macro language? You may be able to write a macro to do this, and if it is only for you then you can hard code the knowledge of your comment style, which would make things easier and more reliable. |
zen is the art of being at one with the two'ness |
|
|
mwb1100
Ketchup Master
82 Posts |
Posted - Nov 29 2006 : 2:37:28 PM
|
I'm currently using a 'Comment Reflow' add-in for VS 2003 & VS 2005 which works pretty well:
http://www.codeproject.com/macro/commentreflower.asp http://commentreflower.sourceforge.net/
But, it doesn't support VS6 and it doesn't do 'live' reflowing (see the SlickEdit Tools videos for an idea of how wicked cool this is).
I understand this is not necessarily an easy feature request (especially from the configuration standpoint), but it's clearly doable, and I think it would be a killer addition to VAX. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Nov 30 2006 : 11:20:48 AM
|
These plugins are certainly interesting, I may well look into them for my own code.
I am not convinced this is something VA should try to offer, but it is a very appealing idea, so I have put in a feature request to see what the developers think of it. Please be aware that this is no guarantee that we will try and do this.
case=3866 |
zen is the art of being at one with the two'ness |
|
|
mwb1100
Ketchup Master
82 Posts |
Posted - Nov 30 2006 : 3:28:15 PM
|
quote: Originally posted by feline I have put in a feature request to see what the developers think of it. Please be aware that this is no guarantee that we will try and do this.
Understood, and thanks (keeping fingers crossed). |
|
|
|
Topic |
|