6

Code Runner for VS Code 突破 2000 万下载量!支持超过 50 种语言

 3 years ago
source link: https://zhuanlan.zhihu.com/p/348144852
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

还记得五年前的夏天,我在巨硬写着世界上最好的语言,有时也需要带着游标卡尺写着另一门语言。然而,我对这两门语言都不熟悉,如果能在 VS Code 中方便快捷地运行各种语言,那岂不是很方便?于是,我就开发了 Code Runner 插件

现在,Code Runner 已经有超过 2000 万的下载量了!

经过数年时间的打磨,Code Runner 的功能越来越丰富,也支持了超过 50 种语言: C, C++, Java, JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, F# (.NET Core), C# Script, C# (.NET Core), VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Visual Basic .NET, Clojure, Haxe, Objective-C, Rust, Racket, Scheme, AutoHotkey, AutoIt, Kotlin, Dart, Free Pascal, Haskell, Nim, D, Lisp, Kit, V, SCSS, Sass, CUDA, Less, Fortran。

此外,Code Runner 还提供了丰富的自定义功能,使用者可以根据自身需求来增加更多语言的支持!

code-runner.executorMap

{
    "code-runner.executorMap": {
        "javascript": "node",
        "php": "C:\\php\\php.exe",
        "python": "python",
        "perl": "perl",
        "ruby": "C:\\Ruby23-x64\\bin\\ruby.exe",
        "go": "go run",
        "html": "\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"",
        "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
        "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
    }
}

code-runner.executorMapByGlob

{
    "code-runner.executorMapByGlob": {
        "pom.xml": "cd $dir && mvn clean package",
        "*.test.js": "tap",
        "*.js": "node"
    }
}

code-runner.executorMapByFileExtension

{
    "code-runner.executorMapByFileExtension": {
        ".vbs": "cscript //Nologo"
    }
}

如果你想了解更多关于 Code Runner 的功能,欢迎 star Code Runner 的 GitHub repo,完全开源:

formulahendry/vscode-code-runner

除了,Code Runner 插件,我也写了不少其他插件,也欢迎大家来使用!

Rneye2i.jpg!mobile

工欲善其事必先利其器,想要更好地玩转 VS Code,也欢迎阅读由我编写的首本 VS Code 中文书:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK