Move cursor down after using Edit.Selection[Un]Comment

Started by Anonymous, March 23, 2011, 11:39:57 AM

Previous topic - Next topic

Anonymous

It would be nice if HippoEdit moved cursor down after [un]commenting current line (not the selection).

And, by the way, there is no need in commenting already commented lines. IMHO.

alex

QuoteIt would be nice if HippoEdit moved cursor down after [un]commenting current line (not the selection).
Well, I have nothing against of this request, can be done. But before I would like to know the scenario and what are the benefits from this change?

QuoteAnd, by the way, there is no need in commenting already commented lines. IMHO.
Here I would disagree. Imagine scenario, when you have some block of code with some lines commented (code or real comments) and do commenting. With your logic, if only not commented lines will be commented, with further uncomment of the block, also original comments will be uncommented. And I do not think that this what user want. Or you need to do uncommenting already partially.
And current behavior is also standard in other editors as Visual Studio fex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Anonymous

Quote from: alex on March 23, 2011, 12:19:48 PM
Well, I have nothing against of this request, can be done. But before I would like to know the scenario and what are the benefits from this change?

The only benefit is speed especially when you are using keyboard, as I do. Just tap Ctrl+"." several times to [un]comment out few lines. This is the way the Multi-Edit did.

Quote from: alex on March 23, 2011, 12:19:48 PM
Here I would disagree. Imagine scenario, when you have some block of code with some lines commented (code or real comments) and do commenting. With your logic, if only not commented lines will be commented, with further uncomment of the block, also original comments will be uncommented. And I do not think that this what user want. Or you need to do uncommenting already partially.
And current behavior is also standard in other editors as Visual Studio fex.

You are right. Then we should talk about "ToggleComment" feature.

alex

QuoteThe only benefit is speed especially when you are using keyboard, as I do. Just tap Ctrl+"." several times to [un]comment out few lines. This is the way the Multi-Edit did.
Ok, this is accepted. One more argument was that such way is already implemented in other editor. What is the position of the cursor after move? Direct under previous position or beginning/end of the line?

About commenting of the already commented lines (I have thought about this a little bit more), such check can be done only such commenting is applied for sinlge line like in example above, but should be skipped for multi line selection and explicit selection.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Anonymous

Quote from: alex on March 23, 2011, 04:07:09 PM
What is the position of the cursor after move? Direct under previous position or beginning/end of the line?

Right below, if possible. I mean if next line is long enough to keep the position.

Quote from: alex on March 23, 2011, 04:07:09 PM
About commenting of the already commented lines (I have thought about this a little bit more), such check can be done only such commenting is applied for sinlge line like in example above, but should be skipped for multi line selection and explicit selection.

I understand the case. And it is clear that "ToggleComment" can not be applied to a milti-line comments, too. So it turns into a "ToggleLineComment" feature. To be honest, I'm not in a great need of it for I prefer to indicate my intentions explicitly by using straight functions - "comment" or "uncomment". But maybe some day it would be useful for someone else. Just keep the idea in mind.

alex

Ok, will be added in next beta.
Toggle I will leave for some time - work with comments is not trivial, especially if supporting all kinds of languages.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Anonymous

On 1.49.804 Edit.SelectionComment works as it was intended to, but Edit.SelectionUncomment stayed untouched.

alex

Yes, I just forgot about this :/ Will be added next beta.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Anonymous

Done in 1.49.805. Now we have a sweet pair to our pleasure.

alex

HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]