{"id":6579,"date":"2020-06-07T21:47:32","date_gmt":"2020-06-08T02:47:32","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=6579"},"modified":"2020-06-09T09:08:04","modified_gmt":"2020-06-09T14:08:04","slug":"vscode-keyboard-shortcuts","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=6579","title":{"rendered":"VSCode Keyboard Shortcuts"},"content":{"rendered":"<p>Scott accidentally hit the wrong key combination when attempting to <a href=\"https:\/\/www.rushworth.us\/lisa\/?p=5619\" target=\"_blank\" rel=\"noopener noreferrer\">comment out a block of code<\/a> and brought up some clipboard viewer; and, in attempting to identify what he hit, I came across published keyboard shortcuts for <a href=\"https:\/\/code.visualstudio.com\/shortcuts\/keyboard-shortcuts-windows.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">Windows<\/a> and <a href=\"https:\/\/code.visualstudio.com\/shortcuts\/keyboard-shortcuts-linux.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">Linux<\/a> (I still haven&#8217;t found the key combo he hit, so I suspect he hit a desktop manager shortcut). There are a few time savers in the list:<\/p>\n<ul>\n<li>Alt in combination with the up\/down arrow keys moves the current line up or down<\/li>\n<li>Shift+alt in combination with the up\/down arrow keys will create a copy of the current line up or down<\/li>\n<li>You do not need to select a line to copy\/cut &#8212; using Ctrl+c or Ctrl+x with no selection will copy\/cut the entire current line<\/li>\n<li>Ctrl+K followed by the letter P copies the path to the active file<\/li>\n<li>Ctrl+K followed by the letter R opens a new file explorer window to the location of the active file<\/li>\n<li>Shift+Alt in combination with the letter i activates a &#8216;multiple cursor&#8217; mode. Each line selected when you use the shortcut will get a cursor at the end of it<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=6580\" rel=\"attachment wp-att-6580\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6580\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor.png\" alt=\"\" width=\"759\" height=\"203\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor.png 759w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor-300x80.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor-750x201.png 750w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/a><\/p>\n<p>And whatever you type will be duplicated at each cursor. To leave multi-cursor mode, simply click elsewhere within the document &#8212; you&#8217;ll have one cursor where you clicked.<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=6581\" rel=\"attachment wp-att-6581\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6581\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursorTyping.png\" alt=\"\" width=\"733\" height=\"191\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursorTyping.png 733w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursorTyping-300x78.png 300w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><\/a><\/p>\n<p>If you want multiple cursors on discontiguous lines, hold the Alt key as you click &#8212; a cursor will appear each location you click (not at the end of the line where you have clicked, literally the location at which you clicked &#8212; including multiple cursors per line.) If you add a cursor in the wrong location, click it again to clear that cursor.<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=6582\" rel=\"attachment wp-att-6582\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6582\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor-discontiguous.png\" alt=\"\" width=\"782\" height=\"234\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor-discontiguous.png 782w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor-discontiguous-300x90.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor-discontiguous-768x230.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/06\/vscode-multicursor-discontiguous-750x224.png 750w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scott accidentally hit the wrong key combination when attempting to comment out a block of code and brought up some clipboard viewer; and, in attempting to identify what he hit, I came across published keyboard shortcuts for Windows and Linux (I still haven&#8217;t found the key combo he hit, so I suspect he hit a &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[827,817],"class_list":["post-6579","post","type-post","status-publish","format-standard","hentry","category-coding","tag-visual-studio-code","tag-vscode"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6579"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6579\/revisions"}],"predecessor-version":[{"id":6583,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6579\/revisions\/6583"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}