{"id":2063,"date":"2024-06-12T19:56:09","date_gmt":"2024-06-12T10:56:09","guid":{"rendered":"https:\/\/secondlife.lol\/?p=2063"},"modified":"2024-06-13T07:16:45","modified_gmt":"2024-06-12T22:16:45","slug":"vscode-shortcuts-tips","status":"publish","type":"post","link":"https:\/\/secondlife.lol\/en\/vscode-shortcuts-tips\/","title":{"rendered":"Conquer VS Code Shortcuts: Tips for writing efficient and effective code!"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Are you familiar with VS Code shortcuts? When you're writing code on the keyboard, do you ever wish you could ditch the mouse and just do it all with the keyboard? Knowing some of the powerful shortcuts in VS Code can help alleviate some of that frustration. \ud83d\ude0a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Today we've prepared a master class on VS Code shortcuts to make your coding less painful! \ud83d\udcbb I'm not going to lie, shortcuts can help you write code 100x faster (you know you're human!), which means you'll save more time and have more time for a cup of coffee! \u2615 Let's dive into the world of VS Code shortcuts together \ud83d\ude80.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">VS Code shortcuts: magical tips to increase your efficiency!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We've organized the most commonly used shortcuts in VS Code into a table below. <strong>Keyboard shortcuts<\/strong>, <strong>Description.<\/strong>, <strong>Frequency of use<\/strong> They are listed in order. Print them out and stick them near your monitor so you can stare at them and have them embedded in your brain without realizing it!<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Keyboard shortcuts<\/th><th>Description.<\/th><th>Frequency of use<\/th><\/tr><\/thead><tbody><tr><td>Ctrl + Space<\/td><td>HTML tag autocompletion<\/td><td>High<\/td><\/tr><tr><td><strong>Ctrl + \/<\/strong><\/td><td>Commenting\/Uncommenting<\/td><td>High<\/td><\/tr><tr><td>Tab, Shift + Tab<\/td><td>Set indentation<\/td><td>High<\/td><\/tr><tr><td>Ctrl + F, <strong>Ctrl + H<\/strong><\/td><td>Search\/replace text<\/td><td>High<\/td><\/tr><tr><td>Ctrl + P, Ctrl + Tab<\/td><td>Move files\/tabs<\/td><td>Medium<\/td><\/tr><tr><td><strong>Shift + Alt + F<\/strong><\/td><td>Code alignment<\/td><td>Medium<\/td><\/tr><tr><td>Alt + \u2191\/\u2193<\/td><td>Moving functions<\/td><td>Medium<\/td><\/tr><tr><td>Ctrl + Shift + R<\/td><td>Refactoring code<\/td><td>Medium<\/td><\/tr><tr><td>Ctrl + C, Alt + \u2191\/\u2193, Ctrl + X<\/td><td>Copy\/Move\/Delete Lines<\/td><td>Medium<\/td><\/tr><tr><td>Ctrl + D<\/td><td>Select a word<\/td><td>Medium<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Key shortcut details<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Ctrl + Space: Autocomplete HTML tags<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is a useful shortcut for quickly typing HTML tags. Type the start tag and the end tag is automatically completed to save you coding time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Ctrl + \/: Comment\/Uncomment<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Shortcuts used to comment or uncomment specific parts of code. It makes your code more readable and allows you to execute only the parts you need.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Ctrl + F, Ctrl + H: Search\/replace text<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Shortcuts for finding or replacing specific words in your code. It's a quick way to find and edit something in a long piece of code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Alt + \u2191\/\u2193: Move lines of code<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A shortcut used to move up or down a specific line of code. This is useful when rearranging code or changing its structure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Tips for using keyboard shortcuts:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Memorize your favorite shortcuts!<\/strong> Once you get used to it, you'll code even faster \ud83d\ude80.<\/li>\n\n\n\n<li><strong>Create a shortcut cheat sheet!<\/strong> Use it as a cheat sheet to refer to whenever you forget. Aging can't help it, love your shortcut cheat sheet! \ud83d\ude09 .<\/li>\n\n\n\n<li><strong>Create your own shortcuts!<\/strong> (For advanced users) Once you're skilled, you can utilize VS Code to 200%! \ud83d\udcaa See the code box below.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># For advanced users, I leave it this small because it's redundant.\n\n1. open Keyboard shortcut settings\n\n1-1. Run VS Code.\n1-2. Click **File** &gt; **Preferences** &gt; **Keyboard Shortcuts** on the menu bar.\n\n2. Search and change keyboard shortcuts\n\n2-1. In the **Keyboard Shortcuts** window that opens, type the command you want to change in the search box at the top. For example, let's search for the command `copy line`.\n2-2. Find the command **Copy Line Down** in the search results.\n\n3. Change the shortcut settings\n\n3-1. Double-click the **Copy Line Down** command, or click the pencil icon next to the command.\n3-2. When the **Keyboard Shortcut Settings window** appears, enter the new shortcut you want to assign. For example, enter `Ctrl + Alt + D`.\n3-3. After entering the keyboard shortcut, press **Enter** to save your settings.\n\n4. Confirm and save settings\n\n4-1. Verify that the new hotkeys are set correctly.\n4-2. Now try to copy the current line down using the shortcut `Ctrl + Alt + D`.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Organize<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">VS Code shortcuts are the essential tools you need to be more efficient when writing code! \u2728 Stop clicking your mouse, code in style with shortcuts, and enjoy your free time! Share your shortcuts with your coworkers and friends, you'll be the hip one!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><kbd>Are you thinking of starting with R language? If you want to know the shortcuts of RStudio, the sister(?) of VS code, click the button below or the post box~.<\/kbd><\/p>\n\n\n<style>.wp-block-kadence-advancedbtn.kb-btns2063_b6bc78-9c{gap:var(--global-kb-gap-xs, 0.5rem );justify-content:flex-start;align-items:center;}.kt-btns2063_b6bc78-9c .kt-button{font-weight:normal;font-style:normal;}.kt-btns2063_b6bc78-9c .kt-btn-wrap-0{margin-right:5px;}.wp-block-kadence-advancedbtn.kt-btns2063_b6bc78-9c .kt-btn-wrap-0 .kt-button{color:#555555;border-color:#555555;}.wp-block-kadence-advancedbtn.kt-btns2063_b6bc78-9c .kt-btn-wrap-0 .kt-button:hover, .wp-block-kadence-advancedbtn.kt-btns2063_b6bc78-9c .kt-btn-wrap-0 .kt-button:focus{color:#ffffff;border-color:#444444;}.wp-block-kadence-advancedbtn.kt-btns2063_b6bc78-9c .kt-btn-wrap-0 .kt-button::before{display:none;}.wp-block-kadence-advancedbtn.kt-btns2063_b6bc78-9c .kt-btn-wrap-0 .kt-button:hover, .wp-block-kadence-advancedbtn.kt-btns2063_b6bc78-9c .kt-btn-wrap-0 .kt-button:focus{background:#444444;}<\/style>\n<div class=\"wp-block-kadence-advancedbtn kb-buttons-wrap kb-btns2063_b6bc78-9c\"><style>ul.menu .wp-block-kadence-advancedbtn .kb-btn2063_e57441-17.kb-button{width:initial;}<\/style><a class=\"kb-button kt-button button kb-btn2063_e57441-17 kt-btn-size-small kt-btn-width-type-auto kb-btn-global-fill kt-btn-has-text-true kt-btn-has-svg-false wp-block-kadence-singlebtn\" href=\"https:\/\/secondlife.lol\/en\/rstudio-shortcuts-magic\/\"><span class=\"kt-btn-inner-text\">See RStudio shortcuts<\/span><\/a><\/div>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-life-2-0-it-playground wp-block-embed-life-2-0-it-playground\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"fTrYsoicSr\"><a href=\"https:\/\/secondlife.lol\/en\/rstudio-shortcuts-magic\/\">Conquering RStudio shortcuts: Magical tips to speed up your data analysis!<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&quot;Conquering RStudio Shortcuts: Magical tips to speed up your data analysis!&quot; - Life2.0: IT Playground\" src=\"https:\/\/secondlife.lol\/rstudio-shortcuts-magic\/embed\/#?secret=PXYga0go1q#?secret=fTrYsoicSr\" data-secret=\"fTrYsoicSr\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>","protected":false},"excerpt":{"rendered":"<p>Are you good at using VS Code shortcuts? When you write code on the keyboard, you'll often find that your mouse...<\/p>","protected":false},"author":3,"featured_media":2069,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[3],"tags":[31,149,69,144,148,147,145,146],"class_list":["post-2063","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-coding","tag-vs-code","tag-149","tag-69","tag-144","tag-148","tag-147","tag-145","tag-146"],"taxonomy_info":{"category":[{"value":3,"label":"\ud30c\uc774\uc36c(Python)"}],"post_tag":[{"value":31,"label":"VS CODE"},{"value":149,"label":"\uace0\uae09"},{"value":69,"label":"\ub2e8\ucd95\ud0a4"},{"value":144,"label":"\uc0dd\uc0b0\uc131"},{"value":148,"label":"\uc911\uae09"},{"value":147,"label":"\ucd08\uae09"},{"value":145,"label":"\ucf54\ub4dc \uc791\uc131"},{"value":146,"label":"\ud301"}]},"featured_image_src_large":["https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/06\/VS-code-\ub2e8\ucd95\ud0a4-600x338.jpg",600,338,true],"author_info":{"display_name":"TERE","author_link":"https:\/\/secondlife.lol\/en\/author\/tere\/"},"comment_info":0,"category_info":[{"term_id":3,"name":"\ud30c\uc774\uc36c(Python)","slug":"python-coding","term_group":0,"term_taxonomy_id":3,"taxonomy":"category","description":"","parent":20,"count":119,"filter":"raw","cat_ID":3,"category_count":119,"category_description":"","cat_name":"\ud30c\uc774\uc36c(Python)","category_nicename":"python-coding","category_parent":20}],"tag_info":[{"term_id":31,"name":"VS CODE","slug":"vs-code","term_group":0,"term_taxonomy_id":31,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"},{"term_id":149,"name":"\uace0\uae09","slug":"%ea%b3%a0%ea%b8%89","term_group":0,"term_taxonomy_id":149,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":69,"name":"\ub2e8\ucd95\ud0a4","slug":"%eb%8b%a8%ec%b6%95%ed%82%a4","term_group":0,"term_taxonomy_id":69,"taxonomy":"post_tag","description":"","parent":0,"count":4,"filter":"raw"},{"term_id":144,"name":"\uc0dd\uc0b0\uc131","slug":"%ec%83%9d%ec%82%b0%ec%84%b1","term_group":0,"term_taxonomy_id":144,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"},{"term_id":148,"name":"\uc911\uae09","slug":"%ec%a4%91%ea%b8%89","term_group":0,"term_taxonomy_id":148,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":147,"name":"\ucd08\uae09","slug":"%ec%b4%88%ea%b8%89","term_group":0,"term_taxonomy_id":147,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":145,"name":"\ucf54\ub4dc \uc791\uc131","slug":"%ec%bd%94%eb%93%9c-%ec%9e%91%ec%84%b1","term_group":0,"term_taxonomy_id":145,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":146,"name":"\ud301","slug":"%ed%8c%81","term_group":0,"term_taxonomy_id":146,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/2063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/comments?post=2063"}],"version-history":[{"count":6,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/2063\/revisions"}],"predecessor-version":[{"id":2078,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/2063\/revisions\/2078"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/media\/2069"}],"wp:attachment":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/media?parent=2063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/categories?post=2063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/tags?post=2063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}