我正在使用 Sublime Text 2 来编写程序,并希望在其中运行控制台来编译和运行它们。有没有办法在 Sublime Text 2 中嵌入控制台命令行?已经在那里了吗?
我同时使用 Windows 和 Linux。
我想你可以尝试创建一个自定义构建系统。工具 --> 构建系统 --> 新构建系统...这是 C 编程语言的简单构建脚本:
{
"cmd" : ["gcc", "$file", "-o", "$file_base_name"],
"cmd" : ["$file_base_name"],
"selector" : "source.c",
"shell" : true,
"working_dir" : "$file_path"
}
Change the current build system to the new one in Tools. When you press CTRL
+ b
it will compile your code and run your executable file. A few syntaxes and options that you can use: http://sublimetext.info/docs/en/reference/build_systems.html http://sublimetext.info/docs/en/reference/build_systems.html There are definitely many more other options that you can declare in the build system. A very useful one is file_regex
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)