- Published on
Resolve the Conflict Between VS Code `code` Command and Cursor `cursor` Command In Windows 11
- Authors
- Name
- Piggy DP
- @xiaozhudxiaozhu
Cursor is a recently popular AI editor. Before this, I was using the VS Code editor. However, after I downloaded Cursor, I encountered a conflict between the code
command in VS Code and Cursor as the following:
When I use code .
command in PowerShell, the editor that opens is Cursor instead of VS Code.
How to fix it:
- Find
code
andcursor
command files
PowerShell (replace Username with your Username ):
Get-Command code
- Backup
code.cmd
andcode
Copy-Item "C:\Users\Username\AppData\Local\Programs\cursor\resources\app\bin\code.cmd" "C:\Users\<Username>\AppData\Local\Programs\cursor\resources\app\bin\code.cmd.bak"
Copy-Item "C:\Users\Username\AppData\Local\Programs\cursor\resources\app\bin\code" "C:\Users\<Username>\AppData\Local\Programs\cursor\resources\app\bin\code.bak"
- Delete
code.cmd
andcode
Remove-Item "C:\Users\Username\AppData\Local\Programs\cursor\resources\app\bin\code.cmd"
Remove-Item "C:\Users\Username\AppData\Local\Programs\cursor\resources\app\bin\code"
- And then we can use
code
to open VS Code