场景
code .
使用 VS Code 打开当前目录
cursor .
使用 Cursor 打开当前目录
问题描述
安装 Cursor 之后,使用 code .
会直接打开 Cursor,而不是 VS Code。
原因分析:
环境变量 Path 配置
C:\Users\92512\AppData\Local\Programs\cursor\resources\app\bin
该目录下存在一个名称为 code 的文件,与 VS Code bin 下的 code 重名。
解决方案:
通过 Path 窗口中的上移,下移进行调整。
在C:\Users\92512\AppData\Local\Programs\cursor\resources\app\bin
上方,新增C:\Users\92512\AppData\Local\Programs\Microsoft VS Code\bin
,即 VS Code 的 bin 目录。