How can I globally set the PATH environment variable in VS Code?

If you only need the $PATH to be set in the integrated terminal, you can use VS Code’s terminal.integrated.env.<platform> variable (added in version 1.15). Press Cmd+Shift+P (or Ctrl+Shift+P) and search for “Preferences: Open Settings (JSON)”. Then add the following entry to the settings file: “terminal.integrated.env.osx”: { “PATH”: “…:/usr/bin:/bin:…” } (Replace .osx with .linux or .windows … Read more

Visual Studio Code is suddenly defaulting to PowerShell for integrated terminal and tasks

Update: Version v1.60.0 had a bug. Upgrade to v1.60.1 or higher for a fix. The bug manifested in the following symptoms: The Open in Integrated Terminal shortcut-menu command in the Explorer pane’s shortcut always uses the built-in default shell (PowerShell on Windows), ignoring the configured one. The same goes for running tasks (with or without … Read more

What are these parameter name annotations in my VS Code editor called, and how can I enable/disable them?

Those are Inlay Hints. You can enable (the default) or disable them with the setting: Editor > Inlay Hints: Enabled or change the Font Family or Font Size by searching for Inlay Hints in the Settings UI. And there is finer control for parameter names/types, variable types and more for js/ts files. For a lot … Read more

How to open Visual Studio Code’s ‘settings.json’ file?

To open the User settings: Open the command palette (either with F1 or Ctrl+Shift+P) Type “open settings” You are presented with a few optionsĀ¹, choose Open User Settings (JSON) This image was taken in the VS Code online editor Which, from the manual and depending on platform, is one of: Windows %APPDATA%\Code\User\settings.jsonĀ² macOS $HOME/Library/Application\ Support/Code/User/settings.json … Read more

How do I disable pylint unused import error messages in vs code

As others have said, you can provide a disable argument to disable a specific message. I wanted to elaborate on that. Here is the syntax for disabling multiple messages and for providing multiple arguments, which was not immediately obvious to me from googling it: “python.linting.pylintArgs”: [ “–max-line-length=80”, “–disable=W0142,W0403,W0613,W0232,R0903,R0913,C0103,R0914,C0304,F0401,W0402,E1101,W0614,C0111,C0301” ] You stated that you started seeing … Read more

Microsoft VS Code – Jump 10 lines vertically at once

Put this into keybindings.json { “key”: “ctrl+up”, “command”: “cursorMove”, “args”: { “to”: “up”, “by”: “line”, “value”: 10 }, “when”: “editorTextFocus” }, { “key”: “ctrl+down”, “command”: “cursorMove”, “args”: { “to”: “down”, “by”: “line”, “value”: 10 }, “when”: “editorTextFocus” }, cursorMove – Move cursor to a logical position in the view args: to: A mandatory logical position … Read more

Absolute module path resolution in TypeScript files in Visual Studio Code

To be able to use absolute paths from import in TypeScript using Visual Studio Code you should be using next version of TypeScript – typescript@next which is TypeScript v2. For that do the following: Install typescript@next via npm. For installing TypeScript v2.x npm i typescript@next -D In Visual Studio Code i) Go to menu File … Read more

VSCode: How to run a command after each terminal open?

On Linux systems you should use: “terminal.integrated.shellArgs.linux” On Windows and OSX: and terminal.integrated.shellArgs.osx respectively. If you want to apply shellArgs setting on a per-workspace basis – you can, despite the fact that documentation says: The first time you open a workspace which defines any of these settings, VS Code will warn you and subsequently … Read more

Multiple commands/tasks with Visual Studio Code

You can always use bash as your task runner and then assign arbitrary terminal commands as your tasks. { “version”: “0.1.0”, “command”: “bash”, “isShellCommand”: true, “showOutput”: “always”, “args”: [ “-c” ], “tasks”: [ { “taskName”: “My First Command”, “suppressTaskName”: true, “isBuildCommand”: true, “args”: [“echo cmd1”] }, { “taskName”: “My Command Requiring .bash_profile”, “suppressTaskName”: true, “args”: … Read more