Use code command to run VSCode Insiders

August 05, 2022

Recently I completely moved from VSCode to VSCode Insiders. It means that I uninstall VSCode and I have only VSCode Insiders installed now.

The most annoying problem I have is that now, if I want to run VSCode Insiders, I have to type in the Windows Terminal:

code-insiders .

versus very simple command that I used to use

code .

However it's very easy to solve this really annoying issue. Below are the steps if you are on Windows:

  1. Make sure that you have the VSCode Insiders path "C:\Users\<your-user-name>\AppData\Local\Programs\Microsoft VS Code Insiders\bin" in the system environment variable PATH.
  2. Open VSCode Insiders path "C:\Users\<your-user-name>\AppData\Local\Programs\Microsoft VS Code Insiders\bin" in the File Explorer
  3. Create the new file "code.cmd" in this folder
  4. Edit this file and add the next content:
@echo off
code-insiders.cmd %*

To check that it works you can type the next command in the terminal:

code --version

And if you see the version of VSCode Insiders then everything works well.

That's it.