Skip to content
Pinter Computing

Knowledge Base for IT Professionals, Teachers, and Astronauts

Pinter Computing

Knowledge Base for IT Professionals, Teachers, and Astronauts

  • Home
  • Programming
  • DevOps
  • Project Management
  • Software and Hardware
  • Miscellaneous
  • Egyebek
  • About
  • Experience
  • Education
  • Contact
  • Home
  • Programming
  • DevOps
  • Project Management
  • Software and Hardware
  • Miscellaneous
  • Egyebek
  • About
  • Experience
  • Education
  • Contact
Close

Search

Home/Knowledge Base/Install and configure Visual Studio Code
Knowledge Base

Install and configure Visual Studio Code

By Laszlo Pinter
April 4, 2019 7 Min Read
0

Install Visual Studio Code

Download the installer from https://code.visualstudio.com/download

See https://code.visualstudio.com/docs/setup/mac

On Windows

Select all four checkboxes for maximum integration

On macOS
Move Visual Studio Code to the Applications folder

The official instructions above start Visual Studio Code in the Downloads folder. Move the file into the Applications folder.

Configure Visual Studio Code

Start Visual Studio Code from the command line

This is a very useful feature. The last checkbox during installation added Visual Studio Code to the system path, so the command “code” will launch it from the terminal.

  • Restart all open terminals for the installation settings to take effect
  • Type code in the terminal to start Visual Studio Code

Enable code execution in PowerShell

When the PowerShell terminal starts in Visual Studio Code it tries to load the profiles. If an error message is displayed, enable code execution. Run the command in a PowerShell as Administrator

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
  • Press A to answer all questions as Yes.

Customize Visual Studio Code

The Visual Studio Code configuration settings are stored in a JSON file on your workstation. You can edit the file and after restart the settings take effect, or you can set the values in the user interface one-by-one.

To customize Visual Studio Code by editing the settings file

Open the settings.json file. The double quotes are important, as both paths contain spaces.

On Mac: $HOME/Library/Application\ Support/Code/User/settings.json

On Windows: “%APPDATA%\Code\User\settings.json”

Useful settings
  • Enable double-click to select the entire word even if it contains a dash (hyphen, minus), as many variables and keywords in modern languages. Remove “-” (dash) from the list in
    Terminal -> Integrated: Word Separators
    Editor: Word Separators (editor.wordSeparators)
  • Set the tab size to 2
    Editor: Tab size
  • Insert final new line
    Files: Insert Final Newline

My current configuration settings file looks like this:

{
    "terminal.integrated.wordSeparators": " ()[]{}',\"`‘’“”|",
    "editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?",
    "editor.tabSize": 2,
    "files.insertFinalNewline": true,
    "editor.acceptSuggestionOnEnter": "off",
    "search.exclude": {
        "**/.terraform": true
    },
    "security.workspace.trust.untrustedFiles": "open",
    "files.exclude": {
        "**/*.js": {
            "when": "$(basename).ts"
        },
        "**/**.js": {
            "when": "$(basename).tsx"
        },
        "**/.trunk/*actions/": true,
        "**/.trunk/*logs/": true,
        "**/.trunk/*notifications/": true,
        "**/.trunk/*out/": true,
        "**/.trunk/*plugins/": true
    },
    "terminal.integrated.defaultProfile.windows": "Git Bash",
    "editor.minimap.enabled": false,
    "github.copilot.nextEditSuggestions.enabled": true,
    "chat.mcp.gallery.enabled": true,
    "[typescriptreact]": {
        "editor.defaultFormatter": "trunk.io"
    },
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "github.copilot.chat.copilotMemory.enabled": true,
    "workbench.settings.alwaysShowAdvancedSettings": true,
    "[typescript]": {
        "editor.defaultFormatter": "trunk.io"
    },
    "chat.checkpoints.showFileChanges": true,
    "chat.editing.explainChanges.enabled": true,
    "chat.promptFilesRecommendations": {},
    "inlineChat.enableV2": true,
    "typescript.updateImportsOnFileMove.enabled": "never",
    "chat.tools.terminal.autoApprove": {
        "pnpm -r typecheck": true,
        "cd": true,
        "echo": true,
        "ls": true,
        "dir": true,
        "pwd": true,
        "cat": true,
        "head": true,
        "tail": true,
        "findstr": true,
        "wc": true,
        "tr": true,
        "cut": true,
        "cmp": true,
        "which": true,
        "basename": true,
        "dirname": true,
        "realpath": true,
        "readlink": true,
        "stat": true,
        "file": true,
        "od": true,
        "du": true,
        "df": true,
        "sleep": true,
        "nl": true,
        "grep": true,
        "/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+status\\b/": true,
        "/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+log\\b/": true,
        "/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+show\\b/": true,
        "/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+diff\\b/": true,
        "/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+ls-files\\b/": true,
        "/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+grep\\b/": true,
        "/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+branch\\b/": true,
        "/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+branch\\b.*\\s-(d|D|m|M|-delete|-force)\\b/": false,
        "/^docker\\s+(ps|images|info|version|inspect|logs|top|stats|port|diff|search|events)\\b/": true,
        "/^docker\\s+(container|image|network|volume|context|system)\\s+(ls|ps|inspect|history|show|df|info)\\b/": true,
        "/^docker\\s+compose\\s+(ps|ls|top|logs|images|config|version|port|events)\\b/": true,
        "Get-ChildItem": true,
        "Get-Content": true,
        "Get-Date": true,
        "Get-Random": true,
        "Get-Location": true,
        "Set-Location": true,
        "Write-Host": true,
        "Write-Output": true,
        "Out-String": true,
        "Split-Path": true,
        "Join-Path": true,
        "Start-Sleep": true,
        "Where-Object": true,
        "/^Select-[a-z0-9]/i": true,
        "/^Measure-[a-z0-9]/i": true,
        "/^Compare-[a-z0-9]/i": true,
        "/^Format-[a-z0-9]/i": true,
        "/^Sort-[a-z0-9]/i": true,
        "/^npm\\s+(ls|list|outdated|view|info|show|explain|why|root|prefix|bin|search|doctor|fund|repo|bugs|docs|home|help(-search)?)\\b/": true,
        "/^npm\\s+config\\s+(list|get)\\b/": true,
        "/^npm\\s+pkg\\s+get\\b/": true,
        "/^npm\\s+audit$/": true,
        "/^npm\\s+cache\\s+verify\\b/": true,
        "/^yarn\\s+(list|outdated|info|why|bin|help|versions)\\b/": true,
        "/^yarn\\s+licenses\\b/": true,
        "/^yarn\\s+audit\\b(?!.*\\bfix\\b)/": true,
        "/^yarn\\s+config\\s+(list|get)\\b/": true,
        "/^yarn\\s+cache\\s+dir\\b/": true,
        "/^pnpm\\s+(ls|list|outdated|why|root|bin|doctor)\\b/": true,
        "/^pnpm\\s+licenses\\b/": true,
        "/^pnpm\\s+audit\\b(?!.*\\bfix\\b)/": true,
        "/^pnpm\\s+config\\s+(list|get)\\b/": true,
        "npm ci": true,
        "/^yarn\\s+install\\s+--frozen-lockfile\\b/": true,
        "/^pnpm\\s+install\\s+--frozen-lockfile\\b/": true,
        "column": true,
        "/^column\\b.*\\s-c\\s+[0-9]{4,}/": false,
        "date": true,
        "/^date\\b.*\\s(-s|--set)\\b/": false,
        "find": true,
        "/^find\\b.*\\s-(delete|exec|execdir|fprint|fprintf|fls|ok|okdir)\\b/": false,
        "rg": true,
        "/^rg\\b.*\\s(--pre|--hostname-bin)\\b/": false,
        "sed": true,
        "/^sed\\b.*\\s(-[a-zA-Z]*(e|f)[a-zA-Z]*|--expression|--file)\\b/": false,
        "/^sed\\b.*s\\/.*\\/.*\\/[ew]/": false,
        "/^sed\\b.*;W/": false,
        "sort": true,
        "/^sort\\b.*\\s-(o|S)\\b/": false,
        "tree": true,
        "/^tree\\b.*\\s-o\\b/": false,
        "/^xxd$/": true,
        "/^xxd\\b(\\s+-\\S+)*\\s+[^-\\s]\\S*$/": true,
        "rm": false,
        "rmdir": false,
        "del": false,
        "Remove-Item": false,
        "ri": false,
        "rd": false,
        "erase": false,
        "dd": false,
        "kill": false,
        "ps": false,
        "top": false,
        "Stop-Process": false,
        "spps": false,
        "taskkill": false,
        "taskkill.exe": false,
        "curl": false,
        "wget": false,
        "Invoke-RestMethod": false,
        "Invoke-WebRequest": false,
        "irm": false,
        "iwr": false,
        "chmod": false,
        "chown": false,
        "Set-ItemProperty": false,
        "sp": false,
        "Set-Acl": false,
        "jq": false,
        "xargs": false,
        "eval": false,
        "Invoke-Expression": false,
        "iex": false,
        "npx vitest": true,
        "pnpm -r build": true,
        "pnpm build": true,
        "pnpm": true,
        "git stash": true,
        "xmllint": true
    },
    "terminal.integrated.stickyScroll.enabled": false,
    "diffEditor.ignoreTrimWhitespace": false,
    "chat.agent.maxRequests": 250,
    "terminal.integrated.allowedLinkSchemes": [
        "file",
        "http",
        "https",
        "mailto",
        "vscode",
        "vscode-insiders",
        "docker-desktop"
    ],
    "files.watcherExclude": {
        "**/.trunk/*actions/": true,
        "**/.trunk/*logs/": true,
        "**/.trunk/*notifications/": true,
        "**/.trunk/*out/": true,
        "**/.trunk/*plugins/": true
    },
    "editor.defaultFormatter": "trunk.io",
    "trunk.showPreexistingIssues": true,
    "chat.tools.urls.autoApprove": {
        "https://code.visualstudio.com": true,
        "https://github.com/microsoft/vscode/wiki/*": true,
        "https://www.material-tailwind.com/docs/react/installation": true,
        "https://www.material-tailwind.com/docs": true,
        "https://www.material-tailwind.com": true,
        "https://*.material-tailwind.com": true,
        "https://github.com/creativetimofficial/material-tailwind/blob/main/changelog.md": true,
        "https://github.com/creativetimofficial/material-tailwind/blob/main": true,
        "https://github.com/creativetimofficial/material-tailwind/blob": true,
        "https://github.com/creativetimofficial/material-tailwind": true,
        "https://github.com/creativetimofficial": true,
        "https://github.com": true,
        "https://registry.terraform.io": {
            "approveRequest": false,
            "approveResponse": true
        },
        "https://learn.microsoft.com": {
            "approveRequest": false,
            "approveResponse": true
        }
    },
    "js/ts.preferences.autoImportFileExcludePatterns": [
        "lucide-react", // or
        "lucide-preact", // or
        "lucide-react-native", // or
        "@lucide/vue",
    ],
    "workbench.browser.dataStorage": "workspace",
    "workbench.browser.enableChatTools": true,
    "github.copilot.chat.agentDebugLog.enabled": true,
    "github.copilot.chat.agentDebugLog.fileLogging.enabled": true,
    "chat.imageCarousel.enabled": true,
    "imageCarousel.explorerContextMenu.enabled": true,
    "chat.useCustomizationsInParentRepositories": true,
    "workbench.colorTheme": "Light 2026",
    "window.autoDetectColorScheme": true,
    "typescript.experimental.useTsgo": true,
    "chat.viewSessions.orientation": "stacked",
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "aikido.coreUrl": "https://ide.aikido.dev",
    "chat.customizations.promptMigration.enabled": true,
    "azureTerraform.survey": {
        "surveyPromptDate": "never",
        "surveyPromptIgnoredCount": 0
    },
    "yaml.disableSchemaDetection": [
        "azure-pipelines.yml",
        "azure-pipelines.yaml"
    ],
    "redhat.telemetry.enabled": false,
    "claudeCode.preferredLocation": "panel",
    "claudeCode.hideOnboarding": true,
    "chat.hookFilesLocations": {
        ".github/hooks": true,
        ".claude/settings.local.json": true,
        ".claude/settings.json": true,
        "~/.copilot/hooks": true,
        "~/.claude/settings.json": true,
        "~/.agents/hooks": true
    },
    "diffEditor.maxComputationTime": 0
}

To customize Visual Studio Code using the UI

  • Open the settings page with Command-, (comma)

or

  • Start Visual Studio Code
  • Open Preferences -> Settings

Only tab should accept the suggestion

To force Visual Studio Code to only insert the suggested word with the Tab key, and configure the Enter key to always insert a new line

  • On the settings tab search for tab
  • Set the Editor: Accept Suggestion On Enter to off

Adds “editor.acceptSuggestionOnEnter”: “off” to the setting.json file

Add trailing newline to every file
  • On the settings tab search for insert final newline
  • Check the Insert Final Newline checkbox

Adds “files.insertFinalNewline”: true, to the settings.json file

Select text with hyphen with double click

To select the entire text–with–hyphen with double click

  • On the settings tab search for editor.wordSeparators
  • Delete – (hyphen) from the separator characters

Adds “editor.wordSeparators”: “`~!@#$%^&*()=+[{]}\\|;:’\”,.<>/?” to the settings.json file.

Exclude libraries from search

When we search the source code it can take along time for Visual Studio Code to search through the libraries that only support our application. Exclude the known library folders. Most of them are already included, add the .terraform folder to the list.

  • On the settings tab search for search.exclude and click the Add Pattern button
  • Enter **/.terraform into the field and click the OK button

Adds

"search.exclude": {
        "**/.terraform": true
    }

to the settings.json file.

Ignore compiled .js files during search when a .ts file exists with the same name

Add this to the settings.json file

    "files.exclude": {
        "**/*.js": { "when": "$(basename).ts" },
        "**/**.js": { "when": "$(basename).tsx" }
    }
Insert 2 spaces into the .yml and .yaml files when we press the tab key, use tabs in Makefile
  • Open the extensions page with Shift-Command-X
  • Install the EditorConfig for VS Code plugin
  • Save this .editorconfig file in the root of your project files above all projects ( for example in the ~/Git directory)
[Makefile]
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2
  • Restart Visual Studio Code
Another setting for yml files, (maybe not necessary if the EditorConfig plugin is installed)
  1. Start Visual Studio Code
  2. Open the Settings page with Command-,
  3. Enter yml into the search field and press enter, and click the Edit settings for yaml link
  4. Enter into the settings.json file
    ,
    "[yml]": {
    "editor.insertSpaces": true,
    "editor.tabSize": 2,
    "editor.autoIndent": false
    },
    "[yaml]": {
    "editor.insertSpaces": true,
    "editor.tabSize": 2,
    "editor.autoIndent": false
    }

Open a Bash terminal in Visual Studio Code

To open a new Bash terminal in Visual Studio Code, install Git Bash and restart Visual Studio Code for the change to take effect. See Install Git on Windows

To set Git Bash as the default terminal on Windows
  • In VS Code open Settings
  • On the settings page search for default profile
  • In the Features/Terminal section set the value for Windows to Git Bash

Upgrade Bash on macOS

To be able to debug Bash scripts in Visual Studio Code on macOS, we need to upgrade Bash to at least version 4.0. Even the most modern macOS installs, a more than 15 year old, Bash version 3.2.57 from 2007!!!

bash –version

GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Software Foundation, Inc.

To upgrade Bash to the latest version follow the instructions by Daniel Weibel at https://itnext.io/upgrading-bash-on-macos-7138bd1066ba

IMPORTANT!!!
If you use iTerm (zshell) keep /bin/zsh as the last item in the /etc/shells file to make it the default shell when you open iTerm.

...
/usr/local/bin/bash
/bin/zsh

Useful extensions

  • EditorConfig for VS Code
  • GitLens — Git supercharged
  • Dev Containers by Microsoft
  • Go ms-vscode.go
  • Terraform mauve.terraform
  • Bash Debug rogalmic.bash-debug
  • Copy Path (Unix Style)

Tags:

VisualStudioCode
Author

Laszlo Pinter

Follow Me
Other Articles
Previous

You must specify a region. You can also configure your region by running “aws configure”.

Next

Docker Swarm overview

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Last Changes

  • How to create a bootable USB drive to install Windows 11 October 11, 2026
  • Nautilus U618 exercise bike magnetic brake adjustment October 11, 2026
  • Health October 11, 2026
  • Limit the battery charge level on MSI laptops October 7, 2026
  • Software and Hardware October 7, 2026

Tags

.NET .NETcore 3Dprinting ASP.NET Core AutodeskInventor AWS C# Chef cloud DevOps Docker EntityFramework Git Go iOS iPad iPhone iPod Java Kubernetes Linux MacOSX MSSQL MVC MySql Node.js Packer PowerShell Python RDS RightScale Ruby security Splunk TeamCity Terraform TestKitchen Tomcat Ubuntu Vagrant VirtualBox VisualStudio Windows WordPress Xcode

Recent Comments

  • Laszlo Pinter on Turn off the built in touchpad when a mouse is attached
  • Kenneth Bush on Turn off the built in touchpad when a mouse is attached
  • Zengei László on MyHeritage családfa exportálása és küldése emailben
  • Raúl Castillo on DynDns update error
  • MICHAEL on Windows Media Player 12 cannot find the album information

–

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Copyright 2026 — Pinter Computing. All rights reserved.