{"id":3315,"date":"2024-08-01T10:44:56","date_gmt":"2024-08-01T13:44:56","guid":{"rendered":"https:\/\/horatech.shop\/?p=3315"},"modified":"2024-11-29T14:19:39","modified_gmt":"2024-11-29T17:19:39","slug":"como-configurar-o-vs-code-para-programacao","status":"publish","type":"post","link":"https:\/\/horatech.shop\/en\/how-to-configure-vs-code-for-programming\/","title":{"rendered":"How to configure vs code for programming"},"content":{"rendered":"<p>Visual Studio Code (VS Code) is one of the most beloved code editors by developers. <\/p>\n\n\n\n<p>From installation to the configuration of keyboard themes, extensions and shortcuts, VS Code offers numerous options to enhance your productivity. <\/p>\n\n\n\n<p>This article will guide you by the essential steps to set up VS Code for programming.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing the VS Code<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Downloading the installer<\/h3>\n\n\n\n<p>To start configuring VS Code, the first step is to download the installer. <\/p>\n\n\n\n<p>The site will automatically identify its operating system and provide the right installer.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/Configuracao-do-VSCode.webp?resize=1024%2C768&#038;ssl=1\" alt=\"\" class=\"wp-image-3316\" style=\"width:529px;height:auto\" srcset=\"https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/Configuracao-do-VSCode.webp?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/Configuracao-do-VSCode.webp?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/Configuracao-do-VSCode.webp?resize=768%2C576&amp;ssl=1 768w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/Configuracao-do-VSCode.webp?w=1200&amp;ssl=1 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>VSCODE CONFIGURATION<\/em><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Running the installation<\/h3>\n\n\n\n<p>Once the download is completed, click the downloaded file to start the installation. <\/p>\n\n\n\n<p>Do not forget to accept the terms of use.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configuring Path<\/h3>\n\n\n\n<p>In the final stage of the installation, check the option \"Add to Path\". <code>code<\/code>. <\/p>\n\n\n\n<p>After marking this option, click \u201cInstall\u201d and when the installation is over, click \u201cFinish\u201d to complete.<\/p>\n\n\n\n<p>Ready!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choosing themes and color schemes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing Preferences<\/h3>\n\n\n\n<p>To customize VS Code, go to preferences. <code>FILE&gt; Preferences&gt; Color Theme<\/code> or simply type <code>Preferences: Color Theme<\/code> in the command palette.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Popular themes<\/h3>\n\n\n\n<p>There are many popular themes that can customize the editor to your taste.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>One Dark Pro<\/strong>: A very popular dark theme among developers.<\/li>\n\n\n\n<li><strong>Atom One Light<\/strong>: Ideal for those who prefer a clear theme.<\/li>\n\n\n\n<li><strong>Dracula<\/strong>: A dark theme developed by Zeno Rocha, a Brazilian.<\/li>\n\n\n\n<li><strong>Material Icon Theme<\/strong>: In addition to color themes, you can change the file icons to the Material Design Style.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Personalizing your theme<\/h3>\n\n\n\n<p>If none of the standard themes please you, you can customize your own theme. <code>FILE&gt; Preferences&gt; Settings<\/code> and look for <code>Workbench.colorCustomizations<\/code>. <\/p>\n\n\n\n<p>Here you can adjust the colors of different elements of the VS Code interface.<\/p>\n\n\n\n<p><strong>Tip<\/strong>: You can add color customizations to the title and status bars within the section <code>Cololustomizations<\/code>.<\/p>\n\n\n\n<p>With these tips, you can make VS code your way and make the program even more enjoyable!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing essential extensions<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/essencial-extensoes-vs-code.webp?resize=1024%2C768&#038;ssl=1\" alt=\"\" class=\"wp-image-3317\" srcset=\"https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/essencial-extensoes-vs-code.webp?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/essencial-extensoes-vs-code.webp?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/essencial-extensoes-vs-code.webp?resize=768%2C576&amp;ssl=1 768w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/essencial-extensoes-vs-code.webp?w=1200&amp;ssl=1 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>essential extensions<\/em><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Exploring the marketplace<\/h3>\n\n\n\n<p>To install extensions on VS Code, visit the Marketplace.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the vs Code.<\/li>\n\n\n\n<li>Click on the extensions icon in the left sidebar or press <code>Ctrl+Shift+X<\/code>.<\/li>\n\n\n\n<li>Use the search bar to find the extensions you want.<\/li>\n\n\n\n<li>Click on <code>Install<\/code> To add the extension to your VS Code.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Recommended extensions<\/h3>\n\n\n\n<p>Here are some extensions that can greatly improve your productivity:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Auto Rename Tag<\/strong>: Automatically rename the corresponding HTML tags when you change one of them.<\/li>\n\n\n\n<li><strong>Highlight Color<\/strong>: Highlights the colors in your CSS code, making it easier to view the colors used.<\/li>\n\n\n\n<li><strong>Live Server<\/strong>: Creates a local server that automatically updates your browser page whenever you save a file.<\/li>\n\n\n\n<li><strong>Prettier<\/strong>: Format your code automatically, ensuring a consistent style.<\/li>\n\n\n\n<li><strong>Eslint<\/strong>: Analyzes your JavaScript code in search of errors and style problems.<\/li>\n\n\n\n<li><strong>Gitlens<\/strong>: Improves GIT integration into the VS Code, showing detailed information about commits and authors.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Managing your extensions<\/h3>\n\n\n\n<p>After installing some extensions, you may want to manage them.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the extension panel (<code>Ctrl+Shift+X<\/code>).<\/li>\n\n\n\n<li>Click the gear icon next to the extension you want to manage.<\/li>\n\n\n\n<li>You can disable, uninstall or configure the extension as needed.<\/li>\n<\/ol>\n\n\n\n<p><strong>Remember<\/strong>: Less is more.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring code formatting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Adjusting formatting preferences<\/h3>\n\n\n\n<p>You can adjust your code formatting preferences on VS Code. <code>Ctrl (CMD) +,<\/code> And look for \"formatting when saving\". <\/p>\n\n\n\n<p>Activate this option so that the code is automatically formatted whenever you save a file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Formatting when saving<\/h3>\n\n\n\n<p>One of the most useful features of VS Code is automatic formatting when saving. <\/p>\n\n\n\n<p>To activate this option, add the following line to your file <code>settings.json<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Using Prettier and other tools<\/h3>\n\n\n\n<p>Prettier is a popular code formatting tool.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install the Prettier Extension on VS Code.<\/li>\n\n\n\n<li>Add the prettier settings to your <code>settings.json<\/code>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>{<\/code><\/pre>\n\n\n\n<p>Now, every time you save a file, Prettier will form the code automatically.<\/p>\n\n\n\n<p>Maintaining well -formatted code not only improves readability, but also helps to avoid unnecessary errors. <\/p>\n\n\n\n<p>Try different tools and find the one that best fits your workflow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Personalizing keyboard shortcuts<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing shortcut settings<\/h3>\n\n\n\n<p>To customize your keyboard shortcuts on VS Code, go to the command palette pressing <code>Ctrl + Shift + P<\/code> and type <code>Preferences: Open Keyboard Shortcuts<\/code>. <\/p>\n\n\n\n<p>This will open a new tab where you can see and modify all available shortcuts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating new shortcuts<\/h3>\n\n\n\n<p>Creating new shortcuts is quite simple. <\/p>\n\n\n\n<p>Remember to choose combinations that do not conflict with other important commands.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Importing and exporting settings<\/h3>\n\n\n\n<p>If you use VS Code in different machines, it may be useful to export your shortcut settings. <code>F1&gt; Preferences: Open Settings (JSON)<\/code> and copy the desired settings. <\/p>\n\n\n\n<p>To import, just paste these settings into the file <code>settings.json<\/code> of the new machine.<\/p>\n\n\n\n<p>Customizing your keyboard shortcuts can greatly increase your productivity, allowing you to work more efficiently and comfortably.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Integrating with git<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Configuring Git in VS Code<\/h3>\n\n\n\n<p>Visual Studio Code has native integration with version control systems like Git. <\/p>\n\n\n\n<p>For starters, open the \u201cSource Control\u201d panel on the left side or use the commands on the lower status bar. <\/p>\n\n\n\n<p>You can initialize a Git repository, perform Commites, Push and Pull, and view and manage changes directly in the editor.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Initialize a git repository<\/strong>: Click the Git icon in the sidebar and then the repository startup button.<\/li>\n\n\n\n<li><strong>Add files to Commit<\/strong>: Mouse over the modified files and click \u201cStage\u201d to add them to Commit.<\/li>\n\n\n\n<li><strong>Commit Commit<\/strong>: Click \u201cCommit Staged\u201d to confirm the changes.<\/li>\n\n\n\n<li><strong>Push for the remote repository<\/strong>: Use the command <code>git push<\/code> in the integrated terminal or through the graphic interface.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Using Gitlens<\/h3>\n\n\n\n<p>Gitlens is a powerful extension that improves GIT integration into the VS Code.<\/p>\n\n\n\n<p>To install Gitlens:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the VS Code extension tab.<\/li>\n\n\n\n<li>Look for gitlens and click Install.<\/li>\n\n\n\n<li>After installation, explore the new features available on the source control panel.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Performing Commites and Push<\/h3>\n\n\n\n<p>To perform Commites and push on VS Code:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Make Changes in Code: Edit your files normally.<\/li>\n\n\n\n<li>Add the changes to the Stage: In the source control panel, click \u201cStage All\u201d to add all changes.<\/li>\n\n\n\n<li>Write a message from Commit: In the message field, describe the changes made.<\/li>\n\n\n\n<li>Commit Commit: Click on the check icon to confirm.<\/li>\n\n\n\n<li>Send the changes to the remote repository: use the command <code>git push<\/code> In the integrated terminal or click the push button on the graphic interface.<\/li>\n<\/ol>\n\n\n\n<p>Integrating GIT with VS Code facilitates version control greatly, allowing you to manage your code efficiently and organized, all in one place.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using the integrated terminal<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/um-programador-usando-o-terminal.webp?resize=1024%2C768&#038;ssl=1\" alt=\"\" class=\"wp-image-3318\" srcset=\"https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/um-programador-usando-o-terminal.webp?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/um-programador-usando-o-terminal.webp?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/um-programador-usando-o-terminal.webp?resize=768%2C576&amp;ssl=1 768w, https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/um-programador-usando-o-terminal.webp?w=1200&amp;ssl=1 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Using the terminal<\/em><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Opening the terminal<\/h3>\n\n\n\n<p>To open the VS Code integrated terminal, use the shortcut `ctrl + \\<\/p>\n\n\n\n<p><code>(Windows\/Linux) or<\/code>Cmd + `(MAC).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Sailing and running commands<\/h3>\n\n\n\n<p>The integrated terminal works like any other terminal.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>CD<\/code> to change directory.<\/li>\n\n\n\n<li><code>LS<\/code> or <code>dir<\/code> To list the files and directories.<\/li>\n\n\n\n<li><code>NPM Install<\/code> To install facilities of a Node.js. project.<\/li>\n\n\n\n<li><code>python script.py<\/code> To run a python script.<\/li>\n<\/ul>\n\n\n\n<p>The integrated terminal allows you to have more control over your development environment without changing between different windows or applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Setting Visual Studio Code for programming is a worthwhile process, as the editor offers a wide range of features and customization options. <\/p>\n\n\n\n<p>From installation to the configuration of themes, extensions and keyboard shortcuts, each step contributes to a more productive and pleasant work environment. <\/p>\n\n\n\n<p>Enjoy the tips and turn VS Code into your main ally when programming!<\/p>","protected":false},"excerpt":{"rendered":"<p>O Visual Studio Code (VS Code) \u00e9 um dos editores de c\u00f3digo mais queridos pelos desenvolvedores. Sua alta personaliza\u00e7\u00e3o permite que voc\u00ea adapte o ambiente de desenvolvimento exatamente \u00e0s suas necessidades. Desde a instala\u00e7\u00e3o at\u00e9 a configura\u00e7\u00e3o de temas, extens\u00f5es e atalhos de teclado, o VS Code oferece in\u00fameras op\u00e7\u00f5es para potencializar sua produtividade. Este [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3316,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3315","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programacao"],"blocksy_meta":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/horatech.shop\/wp-content\/uploads\/2024\/09\/Configuracao-do-VSCode.webp?fit=1200%2C900&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/posts\/3315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/comments?post=3315"}],"version-history":[{"count":3,"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/posts\/3315\/revisions"}],"predecessor-version":[{"id":3801,"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/posts\/3315\/revisions\/3801"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/media\/3316"}],"wp:attachment":[{"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/media?parent=3315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/categories?post=3315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/horatech.shop\/en\/wp-json\/wp\/v2\/tags?post=3315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}