看到一篇文章:https://xuanwo.org/2014/06/05/sublime-text-3-IDE/
可是其中的配置并不好用,尤其是编译完了之后运行,没有交互。使用GCC + Sublime Text3可以搞定简单的C++程序,大型工程还是用VS吧。在Sublime Text3中新建编译系统,配置内容改为:
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"encoding":"cp936",
"variants":
[
{
"name": "Run",
"cmd":["cmd","/C","start", "cmd","/c", "${file_path}/${file_base_name}.exe & pause"]
}
]
}
Ctul + B 编译
Ctul + Shift + B 调出控制台运行