How to prevent the "code . " command in the terminal from opening Cursor

Hi. I’ve been using Cursor for a while now and it’s really great.

One thing that really irritates me, however, is the fact that after installing Cursor, when I run the "code . " command in the terminal, instead of launching my default VSC editor, Cursor is launched.

How do I get VSC back to opening on this command? Cursor is great, but I still want to leave "code ." for VSCode.

3 Likes

You need to reinstall the “code” command from normal VSCode so that it overrides it again.

Weird, but I can’t see this command. But isn’t this instruction only for macOS? I am working on windows

Hmm. You should also get the option to install the “code” command when running the VSC installer.

If you’re in Windows, open Run (Win+R) and type:
%localappdata%\Programs\cursor\resources\app\bin

Delete two files:

  • code
  • code.cmd

I hope this helped.

3 Likes

I have the same problem. Not sure if I should reinstall the Appimage by deleting it or something else

This solved the problem for me.

My issue was that after installing Cursor in Windows, the “code” command in WSL2 stopped working.

The error message was “Unable to determine app path from symlink : /mnt/c/Users/Ivan/AppData/Local/Programs/cursor/resources/app/bin/code”

After deleting the 2 files and launching “code” in wsl2, VSCode started installing itself again.

This is so obnoxious. Just highlights the fact that there is no reason this shouldn’t be an VS code extension rather than piggybacking on top of Code breaking things left and right.