jeson155
deepin
2018-12-20 02:13 看来 ,是没有人上来看的,我自己来吧。
以下是我的改动。好了!
My c++
/home/wen/.config/sublime-text-3/Packages/User
在自己的文件目录 下:我的是:/home/wen/
ctrl +h
会显示隐藏的文件 和目录,上面就 是文件的目录
在这建一个文档,也可在sublime 下建立,:就是 菜单下的 tool --- buildsytem---new build system
会在这儿自动建立新文件 ,
文件 内容 :
{
"shell_cmd": "g++ '${file}' -o '${file_path}/${file_base_name}'",
"file_regex": "^(..[^:]*)
[0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Build & Run",
"shell_cmd": "x-terminal-emulator -e bash -c \"g++ '${file}' -o '${file_path}/${file_base_name}' ; '${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\""
},
{
"name": "Run Only",
"shell_cmd": "x-terminal-emulator -e bash -c \"'${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\""
}
]
}
我这也是好不容易找到的,属于借鉴
在DEEPIN
下会编译运行C++的程序
运行时也能在CMD的命令窗口里输入数据,不过是c的能,比如CIN的不行/
亲测,编译:scanf 可以输入,CIN<<失败。
以下是我的改动。好了!
My c++
/home/wen/.config/sublime-text-3/Packages/User
在自己的文件目录 下:我的是:/home/wen/
ctrl +h
会显示隐藏的文件 和目录,上面就 是文件的目录
在这建一个文档,也可在sublime 下建立,:就是 菜单下的 tool --- buildsytem---new build system
会在这儿自动建立新文件 ,
文件 内容 :
{
"shell_cmd": "g++ '${file}' -o '${file_path}/${file_base_name}'",
"file_regex": "^(..[^:]*)
[0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Build & Run",
"shell_cmd": "x-terminal-emulator -e bash -c \"g++ '${file}' -o '${file_path}/${file_base_name}' ; '${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\""
},
{
"name": "Run Only",
"shell_cmd": "x-terminal-emulator -e bash -c \"'${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\""
}
]
}
我这也是好不容易找到的,属于借鉴
在DEEPIN
下会编译运行C++的程序
运行时也能在CMD的命令窗口里输入数据,不过是c的能,比如CIN的不行/
亲测,编译:scanf 可以输入,CIN<<失败。
Reply Like 0 View the author


中文 

在线等 !!有没有sublime text 3 ,配置成功能够编译c++运行,并能够在CMD窗口中输入数据的??
在线等 @@@