我想在 VS Code 中运行 python 的选择代码。到目前为止,我必须复制代码并将其粘贴到下面的终端中才能运行。系统是mac操作系统。
那么有没有办法让我选择代码后直接运行代码呢?例如,像快捷方式。
“在活动终端中运行所选文本”命令没有默认的键绑定,但您可以创建一个。
- Press Ctrl+K, Ctrl+S to open File → Preferences → Keyboard Shortcuts.
- 搜索
workbench.action.terminal.runSelectedText
在按键绑定中。
- Press the icon on the left to open a windnow with this message "Press desired key combination..." and make your choice. (I've pressed Ctrl+Alt+R - as this combination was not used yet.)
- Press Enter to store your keybinding.
在 Windows 10 Pro 上的 VSCode 1.30.2 上进行了测试。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)