Code Runner for VS Code, 支持运行 27 种语言 (C, C++, Java , JS, PHP , Python , Perl, Ruby, Go, Lua, Groovy, PowerShell...)

2017 年 1 月 14 日
 formulahendry

经过了半年的打磨,Code Runner已经支持了 27 种语言: C, C++, Java, JS, PHP, Python, Perl, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F#, C#, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml, R, AppleScript, Elixir 。并且支持以下几个主要功能:

如果大家发现了任何 bug 或者有什么建议,欢迎来GitHub给我提 issue 或者 PR 。

18042 次点击
所在节点    程序员
59 条回复
langmoe
2017 年 1 月 14 日
我还以为买的 Code Runner 又有更新了。。
chairchan
2017 年 1 月 14 日
兹词 正在用😀
KiriGiri
2017 年 1 月 14 日
可以添加一个功能,把运行结果直接替换选中的代码,就像 vim 的:'<,'>!command 。
asxaqz
2017 年 1 月 14 日
一直在用。支持。
0915240
2017 年 1 月 14 日
我曹 !
兹词~~
40huo
2017 年 1 月 14 日
兹词,好用!
cdwyd
2017 年 1 月 14 日
python 的输出不是实时的吗?测试了下是全部执行完才统一输出
quericy
2017 年 1 月 14 日
厉害了,已安装
exoticknight
2017 年 1 月 14 日
好厉害,是不是应该换了……
kchum
2017 年 1 月 14 日
我也以为是 Code Runner 2 。。
loading
2017 年 1 月 14 日
比 vs go 是不是强一些呢,看看。
pipecat
2017 年 1 月 14 日
在用,支持
formulahendry
2017 年 1 月 14 日
@langmoe @kchum 我们这个 Code Runner 可是免费跨平台的哦😁
formulahendry
2017 年 1 月 14 日
@KiriGiri VIM 没怎么用过,能具体说下吗?比如说,运行 var a = 1 + 2 ,然后把代码替换为 var a = 3?
blanu
2017 年 1 月 14 日
Great! VSCode 自带的调试运行时太重,这个看上去就非常方便
formulahendry
2017 年 1 月 14 日
@blanu 对滴!而且能选择运行 code snippet ,快捷轻巧😎
XYxe
2017 年 1 月 14 日
Python 输出的中文会乱码
另外,不能区分 Python2 和 Python3 吗?
formulahendry
2017 年 1 月 14 日
@XYxe
关于乱码,有两个解决方法:
1. 设置 PYTHONIOENCODING ,参考 https://github.com/formulahendry/vscode-code-runner/issues/33#issuecomment-263131627
"code-runner.executorMap": {
"python": "set PYTHONIOENCODING=utf8 && python"
}
2. 设置使用 built-in terminal ,参考 https://github.com/formulahendry/vscode-code-runner/issues/25#issuecomment-257123682
"code-runner.runInTerminal": true

关于区分 Python2 和 Python3 ,可以在 user settings 自定义 code-runner.executorMap ,参考 https://github.com/formulahendry/vscode-code-runner#configuration
XYxe
2017 年 1 月 14 日
@formulahendry 啊,谢谢 。不能把 Python2 和 3 设置为不同语言吗?因为不同的文件可能需要不同版本, 每次修改设置会比较麻烦。
formulahendry
2017 年 1 月 14 日
@cdwyd 唉, python 真的有这个问题唉,其他语言倒是能实时输出的😅不过有办法可以 workaround ,在 user settings 设置使用 ntegrated Terminal :
"code-runner.runInTerminal": true

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/334547

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX