Jeff Key

It works on my machine

Sponsors

My Job

My stuff

Old stuff

Useful Stuff

Favorite VS.NET keyboard shortcut of the day

CTRL+L == Delete line == Happiness

Comments

Josh said:

Shift + Del does this, too
# March 19, 2004 6:27 PM

Jeff Key said:

In C# Shift+DEL is Cut. If you have text selected, it cuts the selected text. If nothing is selected, it cuts the whole line. (This is important if you have other stuff you want to paste already on the clipboard.)

FWIW, I thought Shift+DEL did this too for a while until I realized I kept losing my clipboard info. :)
# March 19, 2004 6:34 PM

No, the best one is said:

CTRL+]

Moves to the corresponding brace\bracket\#ifdef

Now THAT is a keystroke
# March 21, 2004 2:08 PM

Kevin A. Boucher said:

Those are good, but my favorite is CTRL + -.

It moves you to the last place you were editing.
# March 22, 2004 2:36 PM

df said:

<hr>
# March 23, 2004 5:37 PM

Omer van Kloeten said:

It also copies the line to the clipboard, unfortunately, as does Shift+Del.
That sucks. I sure could use one that just deleted a line without copying it to the clipboard.
# March 25, 2004 2:19 PM

Jeff Key said:

Doh! You're right, Omer. That's quite a bummer and I'm surprised I haven't been bitten by it. Thanks for the info.
# March 25, 2004 2:30 PM

Kiliman said:

Do you know if there's a shortcut for Duplicate Line?

Another thing... do you know how do disable the "feature" where Ctrl+C will copy the line if nothing is selected?

<rant>I don't know how many times I've accidentally hit Ctrl+C when I meant to press Ctrl+V (paste). Luckily you can press Ctrl+Shift+V to cycle through the clipboard to paste the thing you wanted to paste before it got overwritten by the stupid Ctrl+C behavior.</rant>

Kiliman
# April 16, 2004 3:19 PM

Jeff Key said:

Unfortunately I dont...BUT:

I didn't know about the Ctrl+Shift+V! Bravo!
# April 16, 2004 7:46 PM

Jeff Key said:

Kiliman: Today's release of Resharper (http://www.jetbrains.net/confluence/display/ReSharper/Changes) includes a duplicate line feature. :)
# April 21, 2004 2:39 PM