Auto-Comment For Editing
I've submitted this to the Tracker as well, just thought I'd get some
opinions here..
Whenever I ( and most people I know ,for that matter ) want to edit a line
of code without losing the original source, you typically make a copy of the
line below it, and comment out the original....so why not automate this with
a Context Menu?
Context Menu -> Edit Selected
//
(Copy for Editing)
Please sign in to leave a comment.
Hello Derek,
I can achieve this effect in three keystrokes:
with the cursor positioned on the line you want to clone,
CTRLC, CTRLV, CTRLSHIFTK
-Michael
I'm glad that works on your computer, because it sure doesn't do it on mine.
I think you're missing a few steps in there somewhere. the CtrlShiftK
doesn't comment out anything unless it's highlighted.
The point is that yes, it can be done in a few keystrokes. But Resharper
isn't about innovation, it's about making things work faster and saving you
every second of development time possible. I know I spend at least an hour a
day commenting out code and pasting it elsewhere to test different ways of
doing things, and it would save me TONS of time to just be able to
quick-click a menu feature to do it for me.
"Michael Teper" <michael.dot.teper@convade.dot.com> wrote in message
news:c5k8hk$qig$1@is.intellij.net...
>
>
>
>
>> I've submitted this to the Tracker as well, just thought I'd get some
>> opinions here..
>>
>> Whenever I ( and most people I know ,for that matter ) want to edit a
>> line of code without losing the original source, you typically make a
>> copy of the line below it, and comment out the original....so why not
>> automate this with a Context Menu?
>>
>>
>>
>> Context Menu -> Edit Selected
>>
>> //
>> (Copy for Editing)
Hi Derek,
We are going to implement the IDEA's Ctrl-D Ctrl-/ shortcuts in the nearest
future. So your request will be solved by 2 keystrokes.
Ctrl-D - duplicate current line or block with preserving caret position
Ctrl-/ - smart comment/uncomment current line or selected block
--
---
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Derek" <derek@btacinc.com> wrote in message
news:c5k8n2$rqj$1@is.intellij.net...
mine.
>
you
a
>
>
How is this different from the native commands?
]]>k,<ctrl>c : Comment Code
]]>k,<ctrl>u : Uncomment Code
"Eugene Pasynkov (JetBrains, Inc.)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:c5ldk1$eu$1@is.intellij.net...
>
nearest
>
>
hour
of
a
not
>
>
Hi Derek,
1) Less keypresses
2) Automatically position caret at the next line with the same offset (if
possible)
2) Ability to comment/uncomment with // or /**/ (if block selected)
So the scenario will be the following:
Original line (| - caret pos)
SomeMethod| (arguments)
Press Ctrl-D
SomeMethod| (arguments)
SomeMethod (arguments)
Press Ctrl-/
// SomeMethod (arguments)
SomeMethod| (arguments)
--
---
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Derek Price" <dprice@doble.com> wrote in message
news:c5ltai$9u1$1@is.intellij.net...
>
in
CtrlShiftK
Resharper
saving
ways
some
a
make
>
>
I'm sorry if I've started some sort of heated debate ( see this thread on
the Tracker ... )
I just thought that anything that saves any inkling of time coding was the
purpose of ReSharper. I mean, the five seconds it takes to do some simple
commands starts to add up ...formatting code takes up a lot of development
time, and testing code does too ... I just felt that this was something that
was done frequently enough to constitute something that could be made
faster!
"Eugene Pasynkov (JetBrains, Inc.)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:c5m3bs$mbb$1@is.intellij.net...
>
>> How is this different from the native commands?
>> ]]>k,<ctrl>c : Comment Code
>> ]]>k,<ctrl>u : Uncomment Code
>
>
>
>
>
>
>>
>> "Eugene Pasynkov (JetBrains, Inc.)" <Eugene.Pasynkov@jetbrains.com> wrote
>> message news:c5ldk1$eu$1@is.intellij.net...
>> > Hi Derek,
>> >
>> > We are going to implement the IDEA's Ctrl-D Ctrl-/ shortcuts in the
>> nearest
>> > future. So your request will be solved by 2 keystrokes.
>> >
>> > Ctrl-D - duplicate current line or block with preserving caret position
>> > Ctrl-/ - smart comment/uncomment current line or selected block
>> >
>> > --
>> > ---
>> > Eugene Pasynkov
>> > Developer
>> > JetBrains, Inc
>> > http://www.jetbrains.com
>> > "Develop with pleasure!"
>> > "Derek" <derek@btacinc.com> wrote in message
>> > news:c5k8n2$rqj$1@is.intellij.net...
>> > > I'm glad that works on your computer, because it sure doesn't do it
>> > > on
>> > mine.
>> > > I think you're missing a few steps in there somewhere. the
>> > > doesn't comment out anything unless it's highlighted.
>> > >
>> > > The point is that yes, it can be done in a few keystrokes. But
>> > > isn't about innovation, it's about making things work faster and
>> > you
>> > > every second of development time possible. I know I spend at least an
>> hour
>> > a
>> > > day commenting out code and pasting it elsewhere to test different
>> of
>> > > doing things, and it would save me TONS of time to just be able to
>> > > quick-click a menu feature to do it for me.
>> > > "Michael Teper" <michael.dot.teper@convade.dot.com> wrote in message
>> > > news:c5k8hk$qig$1@is.intellij.net...
>> > > > Hello Derek,
>> > > >
>> > > > I can achieve this effect in three keystrokes:
>> > > >
>> > > > with the cursor positioned on the line you want to clone,
>> > > > CTRLC, CTRLV, CTRLSHIFTK
>> > > >
>> > > > -Michael
>> > > >
>> > > >> I've submitted this to the Tracker as well, just thought I'd get
>> > > >> opinions here..
>> > > >>
>> > > >> Whenever I ( and most people I know ,for that matter ) want to
>> > > >> edit
>> > > >> line of code without losing the original source, you typically
>> a
>> > > >> copy of the line below it, and comment out the original....so why
>> not
>> > > >> automate this with a Context Menu?
>> > > >>
>> > > >>
>> > > >>
>> > > >> Context Menu -> Edit Selected
>> > > >>
>> > > >> //
>> > > >> (Copy for Editing)
>> > > >
>> > >
>> > >
>> >
>> >
>>
>>
>
Hello Derek,
Sorry, CTRLK, CTRLC is the command I meant in my previous post.
-Michael
>> Hi Derek,
>>
>> We are going to implement the IDEA's Ctrl-D Ctrl-/ shortcuts in the
>>
>> future. So your request will be solved by 2 keystrokes.
>>
>> Ctrl-D - duplicate current line or block with preserving caret
>> position Ctrl-/ - smart comment/uncomment current line or selected
>> block
>>
>> --
>> ---
>> Eugene Pasynkov
>> Developer
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>> "Derek" <derek@btacinc.com> wrote in message
>> news:c5k8n2$rqj$1@is.intellij.net...
>>> I'm glad that works on your computer, because it sure doesn't do it
>>> on
>>>
>> mine.
>>
>>> I think you're missing a few steps in there somewhere. the
>>> CtrlShiftK doesn't comment out anything unless it's highlighted.
>>>
>>> The point is that yes, it can be done in a few keystrokes. But
>>> Resharper isn't about innovation, it's about making things work
>>> faster and saving
>>>
>> you
>>
>>> every second of development time possible. I know I spend at least
>>> an
>>>
>> a
>>
>>> day commenting out code and pasting it elsewhere to test different
>>> ways
>>>
>>> doing things, and it would save me TONS of time to just be able to
>>> quick-click a menu feature to do it for me.
>>> "Michael Teper" <michael.dot.teper@convade.dot.com> wrote in message
>>> news:c5k8hk$qig$1@is.intellij.net...
>>>> Hello Derek,
>>>>
>>>> I can achieve this effect in three keystrokes:
>>>>
>>>> with the cursor positioned on the line you want to clone, CTRL+C,
>>>> CTRLV, CTRLSHIFT+K
>>>>
>>>> -Michael
>>>>
>>>>> I've submitted this to the Tracker as well, just thought I'd get
>>>>> some opinions here..
>>>>>
>>>>> Whenever I ( and most people I know ,for that matter ) want to
>>>>> edit a line of code without losing the original source, you
>>>>> typically make
>>>>>
>>>>> copy of the line below it, and comment out the original....so why
>>>>>
>>>>> automate this with a Context Menu?
>>>>>
>>>>>
>>>>>
>>>>> Context Menu -> Edit Selected
>>>>>
>>>>> //
>>>>> (Copy for Editing)