c在sublime里能像python一样配置输入输出新建窗口显示么

yangqien8 2017-10-04 12:23:31
sublime keybuild里python设置如下
[
{
"keys":["f5"],
"caption": "SublimeREPL: Python - RUN current file",
"command": "run_existing_window_command", "args":
{"id": "repl_python_run","file": "config/Python/Main.sublime-menu"}
},
]


网上查了下在sublime的user文件下下新建了c.sublime-build
内容是
{
"working_dir": "$file_path",
"cmd": "gcc -Wall \"$file_name\" -o \"$file_base_name\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.c",

"variants":
[
{
"name": "Run",
"shell_cmd": "gcc -Wall \"$file\" -o \"$file_base_name\" && start cmd /c \"\"${file_path}/${file_base_name}\" & pause\""
}
]
}
然后运行的时候也不会弹出新的cmd窗口还是在控制台显示 怎么修改能弹出cmd窗口 或者不用弹怎么像python设置一样可以新开一个sublime的窗口然后在里面输入输出?
...全文
217 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
丷空心菜丷 2019-10-12
  • 打赏
  • 举报
回复
{

"encoding":"utf-8",

"cmd": "cmd /c g++ -fexec-charset=GBK \"${file}\" -o \"${file_path}/${file_base_name}\" && start cmd /c \"\"${file_path}/${file_base_name}\" && pause\"",

"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",

"working_dir": "${file_path}",

"selector": "source.c++",

"variants":

[

{

"name": "Run",
"cmd": "cmd /c g++ -fexec-charset=GBK \"${file}\" -o \"${file_path}/${file_base_name}\" && start cmd /c \"\"${file_path}/${file_base_name}\" && pause\""
}

]

}
这是我的配置,拿走不谢
yi19861209 2017-10-06
  • 打赏
  • 举报
回复
yangqien8 2017-10-04
  • 打赏
  • 举报
回复

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧