{"id":2343,"date":"2010-03-10T15:24:00","date_gmt":"2010-03-10T15:24:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2010\/03\/10\/tips-and-tricks-clipboard-ring-and-toolbox-snippets\/"},"modified":"2019-02-14T15:39:42","modified_gmt":"2019-02-14T23:39:42","slug":"tips-and-tricks-clipboard-ring-and-toolbox-snippets","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/tips-and-tricks-clipboard-ring-and-toolbox-snippets\/","title":{"rendered":"Tips and Tricks: Clipboard Ring and Toolbox Snippets"},"content":{"rendered":"<p>I was spending some time responding to <a href=\"http:\/\/connect.microsoft.com\/VisualStudio\/content\/content.aspx?ContentID=12362\">Connect<\/a> bugs the other day when I ran across <a href=\"http:\/\/connect.microsoft.com\/VisualStudio\/feedback\/details\/537490\/clip-board-history-window\">this suggestion<\/a>:<\/p>\n<blockquote>\n<p><em>\u201cIt would be nice to have a clip board history window that could be next to the control toolbox as a nice utility window. (Often in presentations I see Microsoft presenters using a custom clipboard tool for such a purpose).<\/em><\/p>\n<p><em>Many times I wish I could go back to something I copied &amp; pasted just a few minutes ago, then to have to go and copy the same text all over again.\u201d<\/em><\/p>\n<\/blockquote>\n<p>Turns out that Visual Studio already has this \u201chidden\u201d<em> <\/em>feature.&nbsp; It\u2019s called the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa301782(VS.71).aspx\">Clipboard Ring<\/a>.&nbsp; If you copy a number of items to the clipboard, pressing <strong>[Ctrl]+[Shift]+[V] <\/strong>will paste the last text that was copied, but it will also highlight the pasted phrase.&nbsp; Continue holding down<strong> [Ctrl]+[Shift] <\/strong>and press<strong> [V] <\/strong>again.&nbsp; This will cause that highlighted section to cycle through the other items on the clipboard.&nbsp; This is extremely useful when you have to copy multiple lines of separate text to a new document.&nbsp; <\/p>\n<p>Now, you might be saying, \u201cGreat, but what if I want to save a piece of code that I use frequently in multiple places?&nbsp; I don\u2019t want to have to cycle through the clipboard ring every time.\u201d&nbsp; Well, <a href=\"https:\/\/www.youtube.com\/watch?v=6ysQ43s9U4Y\">there\u2019s also a feature for that<\/a>!&nbsp; If you highlight a section of code (or text) and drag it to the Toolbox, VS will create a &#8220;snippet\u201d (not to be confused with <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms165392.aspx\">code snippets<\/a>) that can be dragged into the VS editor.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/image_2.png\"><img decoding=\"async\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2010\/03\/image_thumb-2.png\" width=\"267\" height=\"262\"><\/a><\/p>\n<p>This feature is <em><strong>extremely <\/strong><\/em>useful for code demos where you don\u2019t want to type out each line of code.&nbsp; <\/p>\n<p>Hope you find these tips useful!<\/p>\n<table border=\"0\" cellSpacing=\"0\" cellPadding=\"2\">\n<tbody>\n<tr>\n<td vAlign=\"top\">&nbsp;<\/td>\n<p>&lt;td =&quot;&#013;&#010;&#013;&#010;&#013;&#010;&#013;&#010;&#013;&#010;&#013;&#010;<\/p>\n<td><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/wespic_2.jpg\"><img decoding=\"async\" title=\"wespic\" border=\"0\" alt=\"wespic\" align=\"left\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2010\/03\/wespic_thumb-2.jpg\" width=\"86\" height=\"70\"><\/a><\/td>\n<td vAlign=\"top\"><strong>Weston Hutchins<\/strong> \u2013 Program Manager, Visual Studio Shell Team <br \/><strong>Short Bio<\/strong>: I started at Microsoft as an intern in 2005 and have been working in Visual Studio ever since.&nbsp; I\u2019m currently a PM on the VS Shell IDE team and work on the core IDE UI and services as well as the Extension Manager and <a href=\"http:\/\/visualstudiogallery.com\/\">http:\/\/visualstudiogallery.com<\/a> integration. Prior to my current duties, I was the SKU manager for the Visual Studio Express products.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>I was spending some time responding to Connect bugs the other day when I ran across this suggestion: \u201cIt would be nice to have a clip board history window that could be next to the control toolbox as a nice utility window. (Often in presentations I see Microsoft presenters using a custom clipboard tool for [&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],"class_list":["post-2343","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-tips-and-tricks"],"acf":[],"blog_post_summary":"<p>I was spending some time responding to Connect bugs the other day when I ran across this suggestion: \u201cIt would be nice to have a clip board history window that could be next to the control toolbox as a nice utility window. (Often in presentations I see Microsoft presenters using a custom clipboard tool for [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/2343","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=2343"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/2343\/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=2343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=2343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=2343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}