{"id":242732,"date":"2023-05-11T08:00:17","date_gmt":"2023-05-11T15:00:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=242732"},"modified":"2023-05-10T09:27:34","modified_gmt":"2023-05-10T16:27:34","slug":"surround-selection-experiment","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/surround-selection-experiment\/","title":{"rendered":"Surround selection experiment"},"content":{"rendered":"<p>You want to quickly select some text and surround it with quotation marks. So, you select your text and hit the quotation mark key on your keyboard, only to find that the selected text now has been replaced by a single \u201c. What you hoped would happen was that the selected text would be surrounded by an opening and closing quotation mark like in the animation below. Let\u2019s do something to fix this.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/05\/Surrounder2.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-242733\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/05\/Surrounder2.gif\" alt=\"Image Surrounder2\" width=\"694\" height=\"130\" \/><\/a><\/p>\n<p>In this experiment, we want to test if we can create a general feature for all languages that makes it easy to surround the selection. In fact, multiple developers have requested this feature, so remember to <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Enable-the-ability-to-surround-a-selecti\/641608\">vote for it<\/a> if you agree.<\/p>\n<p>Our hypothesis is that a feature like this is language agnostic and doesn\u2019t need to be customized per language. But we need your help to help test that hypothesis and, potentially, help improve the feature design. We\u2019ve created an extension for Visual Studio called <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=MadsKristensen.Surrounder\">Surrounder<\/a> that we\u2019ll be using for this experiment.<\/p>\n<p>The extension is very simple to use. Any time you have a selection and type one of the supported characters, the selection will be surrounded by that character and its closing equivalent, as shown in this table:<\/p>\n<table>\n<tbody>\n<tr>\n<th>Opening<\/th>\n<th>Closing<\/th>\n<\/tr>\n<tr>\n<td>&#8220;<\/td>\n<td>&#8220;<\/td>\n<\/tr>\n<tr>\n<td>\u2018<\/td>\n<td>\u2018<\/td>\n<\/tr>\n<tr>\n<td>`<\/td>\n<td>`<\/td>\n<\/tr>\n<tr>\n<td>(<\/td>\n<td>)<\/td>\n<\/tr>\n<tr>\n<td>[<\/td>\n<td>]<\/td>\n<\/tr>\n<tr>\n<td>{<\/td>\n<td>}<\/td>\n<\/tr>\n<tr>\n<td>&lt;<\/td>\n<td>&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>To participate in this experiment, install the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=MadsKristensen.Surrounder\">Surrounder<\/a> extension and let us know how it works for you. Either by commenting in this blog post, or by opening issues or pull requests on the <a href=\"https:\/\/github.com\/madskristensen\/Surrounder\">GitHub repo<\/a>.<\/p>\n<p>There is currently an open <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Enable-the-ability-to-surround-a-selecti\/641608\">feature request<\/a> for us to implement this behavior in Visual Studio, so make sure to go <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Enable-the-ability-to-surround-a-selecti\/641608\">vote for it<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You want to quickly select some text and surround it with quotation marks. So, you select your text and hit the quotation mark key on your keyboard, only to find that the selected text now has been replaced by a single \u201c. What you hoped would happen was that the selected text would be surrounded [&hellip;]<\/p>\n","protected":false},"author":642,"featured_media":242733,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[6879,6862],"class_list":["post-242732","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-editor","tag-experiment"],"acf":[],"blog_post_summary":"<p>You want to quickly select some text and surround it with quotation marks. So, you select your text and hit the quotation mark key on your keyboard, only to find that the selected text now has been replaced by a single \u201c. What you hoped would happen was that the selected text would be surrounded [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/242732","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\/642"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=242732"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/242732\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/242733"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=242732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=242732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=242732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}