Feature Request : Duplicate & comment

How about the ability to select 1 or more lines and be able to duplicate
and comment there original (or the new). Atm ^d is not really line smart
so ^d, / does not do the trick. But hey, I duplicate & comment a lot so having
a single function to do it would be great.

Thanks


2 comments
Comment actions Permalink

Hello Chad,

What do you mean by "^d is not really line smart"? I would expect using "duplicate
line" + "line comment" to achieve the task, what's wrong with this approach?

You can also write a macro:

Sub DuplicateAndComment()
DTE.ExecuteCommand ("ReSharperAddIn25.DuplicateText")
DTE.ExecuteCommand("Edit.CommentSelection")
End Sub

Then assign macro to your favorite shortcut.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


CB> How about the ability to select 1 or more lines and be able to
CB> duplicate and comment there original (or the new). Atm ^d is not
CB> really line smart so ^d, / does not do the trick. But hey, I
CB> duplicate & comment a lot so having a single function to do it would
CB> be great.
CB>
CB> Thanks
CB>


0
Comment actions Permalink

Hello Ilya,

What I mean by "line smart" is that you have to select your last line's CR
otherwise you have to do a manual CR before commenting. Now I know this is
by design but when you do a multi-line select the chances are 99% that you
want the lines plus their respective CRs. Easy way to illustrate this would
be to select a couple of lines from the end of the last line to the top,
do a ^d and your duplicated text would be appended at the end of your last
selected line.

For now I'll just get into the habbit of making sure that I have all the
CRs in the selection. I should have titled this "Duplicate and Comment Lines".

Hello Chad,

What do you mean by "^d is not really line smart"? I would expect
using "duplicate line" + "line comment" to achieve the task, what's
wrong with this approach?

You can also write a macro:

Sub DuplicateAndComment()
DTE.ExecuteCommand ("ReSharperAddIn25.DuplicateText")
DTE.ExecuteCommand("Edit.CommentSelection")
End Sub
Then assign macro to your favorite shortcut.

Sincerely,
Ilya Ryzhenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

CB>> How about the ability to select 1 or more lines and be able to
CB>> duplicate and comment there original (or the new). Atm ^d is not
CB>> really line smart so ^d, / does not do the trick. But hey, I
CB>> duplicate & comment a lot so having a single function to do it
CB>> would be great.
CB>>
CB>> Thanks
CB>>


0

Please sign in to leave a comment.