Restrict Blank Line Cut or Copy while coding in Visual Studio

By | January 22, 2016

Here is another handy and quick tip that can you help you to avoid accidental copying blank line of code.  During the development sometime we hit Ctrl+C  (copy) where as we actually wanted to do a Ctrl+V(past) . With this you missed what had been copied, also it copied a blank line. In case of Clipboard Ring feature, you have a blank line copied with in your clipboard cycle and it is difficult to get rid of it unless you do a complete cycle of new selection.


Did you know – In Visual Studio you can copy multiple code blocks together and paste them one by one ?

 Navigate to Tools -> Options -> Text Editor -> All Languages / C# , under settings unchecked the “Apply Cut or Copy commands to blank lines when there is no selection” checkbox. By default it is checked.


With this option selected , Visual Studio will ignore any copy item to clip board when there is no selection.

   This is very handy when it comes multiple copy paste.

Hope this helps !!

Author: Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

One thought on “Restrict Blank Line Cut or Copy while coding in Visual Studio

  1. Pingback: Dew Drop – January 25, 2016 (#2173) | Morning Dew

Comments are closed.