{"id":2263,"date":"2010-03-25T01:35:00","date_gmt":"2010-03-25T01:35:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2010\/03\/25\/tips-and-tricks-apply-or-dont-apply-cut-or-copy-commands-to-blank-lines\/"},"modified":"2022-10-14T13:43:16","modified_gmt":"2022-10-14T20:43:16","slug":"tips-and-tricks-apply-or-dont-apply-cut-or-copy-commands-to-blank-lines","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/tips-and-tricks-apply-or-dont-apply-cut-or-copy-commands-to-blank-lines\/","title":{"rendered":"Tips and Tricks:  Apply (or Don\u2019t Apply) Cut or Copy commands to blank lines"},"content":{"rendered":"<p>As you may know, Visual Studio\u2019s cut and copy commands are useful for more than just selected text.\u00a0 If you invoke them when there is no selection, VS will cut or copy your entire line, which saves you the trouble of selecting the line before adding it to the clipboard.\u00a0 Although a lot of developers find this helpful, we occasionally hear feedback that this feature becomes annoying when Visual Studio clears your clipboard if you accidentally hit Ctrl+X or Ctrl+C on a blank line with no selection.\u00a0 Fortunately, there\u2019s an option for that:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Apply%20Cut%20or%20Copy%20commands%20to%20blank%20lines%20when%20there%20is%20no%20selection_4.png\"><img decoding=\"async\" title=\"Apply Cut or Copy commands to blank lines when there is no selection\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2010\/03\/Apply20Cut20or20Copy20commands20to20blank20lines20when20there20is20no20selection_thumb_1.png\" alt=\"Apply Cut or Copy commands to blank lines when there is no selection\" width=\"640\" height=\"373\" border=\"0\" \/><\/a><\/p>\n<p>If you often find yourself copying blank lines to the clipboard and erasing the previous clipboard contents, try navigating to Tools-&gt;Options-&gt;Text Editor-&gt;[All Languages or your favorite language]-&gt;General and unchecking \u201cApply Cut or Copy commands to blank lines when there is no selection.\u201d\u00a0 You\u2019ll still have the convenience of cutting or copying entire lines to the clipboard without the risk of unintentionally replacing your clipboard contents with white space.\u00a0 And if you do inadvertently end up with a blank clipboard, the <a title=\"The Visual Studio Blog : Tips and Tricks: Clipboard Ring and Toolbox Snippets\" href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/tips-and-tricks-clipboard-ring-and-toolbox-snippets\/\">Clipboard Ring<\/a> feature can often paste your previous text without requiring you to recopy it.<\/p>\n<p>If you like the tips and tricks we sometimes post on this blog, you might also be interested in the <a title=\"Visual Studio Tips and Tricks\" href=\"https:\/\/learn.microsoft.com\/en-us\/archive\/blogs\/zainnab\/\">Visual Studio Tips and Tricks blog<\/a>, which is devoted to these little productivity boosters.\u00a0 There\u2019s even a <a title=\"Visual Studio Tips and Tricks : Announcing the Visual Studio Tip of the Day Extension\" href=\"https:\/\/learn.microsoft.com\/en-us\/archive\/blogs\/zainnab\/\">Tip of the Day Start Page extension<\/a> for the <a title=\"Visual Studio 2010 and .NET Framework 4 Release Candidate\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=151797\">VS 2010 RC<\/a> \u2013 check it out and let us know what you think!<\/p>\n<p>Brittany Behrens\nProgram Manager, Visual Studio Editor Team<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<div id=\"authorBottom\">\n<p><img decoding=\"async\" title=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2010\/03\/clip_image002_3.jpg\" alt=\"clip_image002\" width=\"50\" height=\"66\" align=\"left\" border=\"0\" \/>I\u2019m Brittany, a Program Manager on the Visual Studio Editor team.\u00a0 Some of you may recognize me from <a title=\"Visual Studio and .NET Framework | Microsoft Connect\" href=\"http:\/\/connect.microsoft.com\/VisualStudio\">Connect bugs<\/a> or as the main voice of <a title=\"Visual Studio Editor (VSEditor) on Twitter\" href=\"https:\/\/twitter.com\/VSEditor\">@VSEditor on Twitter<\/a>, and I\u2019m responsible for a variety of Editor features.\u00a0 I love hearing from customers, so please let me know what you think!<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>As you may know, Visual Studio\u2019s cut and copy commands are useful for more than just selected text.\u00a0 If you invoke them when there is no selection, VS will cut or copy your entire line, which saves you the trouble of selecting the line before adding it to the clipboard.\u00a0 Although a lot of developers [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[287,13],"class_list":["post-2263","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-tips-and-tricks","tag-visual-studio-2010"],"acf":[],"blog_post_summary":"<p>As you may know, Visual Studio\u2019s cut and copy commands are useful for more than just selected text.\u00a0 If you invoke them when there is no selection, VS will cut or copy your entire line, which saves you the trouble of selecting the line before adding it to the clipboard.\u00a0 Although a lot of developers [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/2263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=2263"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/2263\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=2263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=2263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=2263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}