First things

Install VS Code and the code command

Visual Studio Code, plus the code command so you can open any folder from the terminal.

  1. Install VS Code
    Terminal
    brew install --cask visual-studio-code

    This also adds the code command, so there's nothing else to set up.

  2. Open the current folder in VS Code
    Terminal
    code .

Check it worked

  1. Check the code command works
    Terminal
    code --version
Undo it
  1. Uninstall VS Code
    Terminal
    brew uninstall --cask visual-studio-code
  1. Install VS CodeNeeds sudo
    Terminal · Ubuntu / Debian
    sudo snap install code --classic
  2. Open the current folder in VS Code
    Terminal · Ubuntu / Debian
    code .

Check it worked

  1. Check the code command works
    Terminal · Ubuntu / Debian
    code --version
Undo it
  1. Uninstall VS CodeNeeds sudo
    Terminal · Ubuntu / Debian
    sudo snap remove code
  1. Install VS Code
    PowerShell
    winget install Microsoft.VisualStudioCode

    Close and reopen PowerShell afterwards so it can find the code command.

  2. Open the current folder in VS Code
    PowerShell
    code .

Check it worked

  1. Check the code command works
    PowerShell
    code --version
Undo it
  1. Uninstall VS Code
    PowerShell
    winget uninstall Microsoft.VisualStudioCode