News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Multi line comment editing

Started by Alpha, April 25, 2015, 10:52:38 PM

Previous topic - Next topic

Alpha

Attached patch modifies the action on press enter while editing a multi line comment.  If anyone has time to test, I would be interested if this behaviour feels useful, or just annoying.

oBFusCATed

Can you explain what it is supposed to change?
Post an example code?
I see no difference in behaviour.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Alpha

#2
Code (cpp) Select

    /**
     * This is a comment.
     * Press enter here to see change:

Code (cpp) Select

    // This is a comment.
    // Press enter here to see change:

Without this patch, the next line will copy the indentation only from the previous line.  With this patch, the leading * or // should also be copied.

Also:
Code (cpp) Select

    /**
     * I am doxygen.
     *
     * @param foo
     * @param pressEnterHere

The pattern will copy "     * @param ".

oBFusCATed

Are you sure you've tested it a lot and thoroughly? For me it works at random.
It is totally broken for non-doxygen comments (it copies random string either '/' or some random text).

Also I'd consider this feature annoying, because it forces me to format comments in certain way that might not be compliant with the style guide I'm using at the moment.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Alpha

Quote from: oBFusCATed on April 26, 2015, 01:07:37 PM
Are you sure you've tested it a lot and thoroughly? For me it works at random.
Had it applied locally for a while, though it is my own code, so of course I am biased.

Quote from: oBFusCATed on April 26, 2015, 01:07:37 PM
Also I'd consider this feature annoying, because it forces me to format comments in certain way that might not be compliant with the style guide I'm using at the moment.
Okay, thanks.  I was more looking for opinions on how it worked.  I will put this down on my checklist of things to improve planning of functionality for the future...

oBFusCATed

Quote from: Alpha on April 28, 2015, 07:11:21 AM
Had it applied locally for a while, though it is my own code, so of course I am biased.
What do you mean by biased?
The single line comments are totally broken.
I had it append just one '/' or even something like '// asdf' when I press enter.
I'm not sure I've seen it work correctly in the little testing I've done.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]