Bite my bytes

What I learn by day I blog at night - A blog from Microsoft Consultant working from Ljubljana, Slovenia

  Home :: Contact :: Syndication  
  999 Posts :: 7691 Comments :: 235 Trackbacks

Search

Most popular posts
in last 360 days

Categories

My Projects

Archives

Stuff


Copyright © by David Vidmar
 
Contact me!
 
LinkedIn Profile
 
 
 

A lot of developers don’t know that “Duplicate Line” DOES exists in Visual Studio or SQL Server Management Studio. You don’t need CodeRush or ReSharper to duplicate current line.

Don’t select any text, just position cursor anywhere on the line you would like to duplicate. Then press CTRL+C followed by CTRL+V and current line will get duplicated.

Today I accidently found that default duplicate line in Visual Studio is also smart! If you do CTRL+C, the select part of line, and press CTRL+V the line will get duplicated, but the selected part will be removed. That’s fantastic, since you really don’t need exactly the same lines, right? They’ll eventually be different and this trick will surely help you.

Check the video demonstration:

Posted on Wednesday, November 11, 2009 9:59 PM | Filed under: Developement |

Feedback

# re: “Smart” Duplicate Line in Visual Studio out of the box 11/12/2009 11:42 PM BrankoH
!? Eh.

# re: “Smart” Duplicate Line in Visual Studio out of the box 11/18/2009 6:54 AM Bissel
Thanks very nice find :)

# re: “Smart” Duplicate Line in Visual Studio out of the box 10/7/2010 10:52 PM Useless
Duplicate line should not remove the content from the clipboard.

# re: “Smart” Duplicate Line in Visual Studio out of the box 11/15/2011 3:01 PM mux
Awesome!
Sadly, second trick (copy, select, paste) doesn't work for me. It just pastes that line instead of selection.

Comments have been closed on this topic.