cursor使用之没有正常的编辑器中的运行箭头

安装 Code Runner 扩展:

  1. 安装步骤:
  • 按 Ctrl+Shift+X 打开扩展面板
  • 搜索 "Code Runner"
  • 点击 "Install" 安装,安装后您会看到:编辑器右上角出现一个 ▶️ 运行箭头 按钮,可以快速运行当前文件。
**使用方式:**点击右上角的运行箭头,或使用快捷键 Ctrl+Alt+N,右键菜单中选择 "Run Code"。

如果想用 Code Runner 运行带参数的脚本,需要配置:

  1. 按 Ctrl+, 打开设置

  2. 搜索 "code-runner.executorMap"

  3. 点击 "Edit in settings.json"

  4. 添加或修改 Python 配置:

    复制代码
    {
        "code-runner.executorMap": {
            "python": "python $fullFileName --device cuda:2 --dataset WikiCS --param local:wikics.json"
        }
    }

或者,您也可以直接在终端中运行(这样更灵活):

python train.py --参数设置

安装 Code Runner 后,您就能看到运行箭头了!

相关推荐
WebGirl2 小时前
Cursor
cursor
ganshenml15 小时前
sed 流编辑器在前端部署中的作用
前端·编辑器
sulikey19 小时前
从入门到精通:如何自己编写高质量的 .gitignore(面向工程实践)
git·gitee·编辑器·gitlab·github·gitignore·gitattributes
EQ-雪梨蛋花汤21 小时前
【AI工具】使用 Doubao-Seed-Code 优化 Unity 编辑器插件:从功能实现到界面美化的完整实践
人工智能·unity·编辑器
撒币使我快乐1 天前
Claude Code + Cursor编程环境初始化
claude·cursor
0欧姆1 天前
VScode 创建 QNX 模板工程
ide·vscode·编辑器
dyxal2 天前
Vim插件深度探索:打造终极开发环境
linux·编辑器·vim
自学AI的鲨鱼儿2 天前
cursor 使用 gvm管理的go的环境出现 Failed to find the “go“ binary in either GOROOT() 错误
golang·cursor·gvm
凌晨一点的秃头猪2 天前
VScode 添加远程服务器教程
ide·vscode·编辑器
Hi_kenyon2 天前
使用vim来完全控制你的VSCode(一)
vscode·编辑器·vim