環境變量
C:\MinGW\bin;D:\C++\MinGW64\bin\g++.exe;D:\Java\jdk-14\bin;D:\Python;D:\Python\Scripts;D:\Python\chromedriver.exe;C:\Users\Meul\Desktop\All\雲班課打包(2)\源代碼;C:\windows\system32;"%SystemRoot%\system32;";"%SystemRoot%;";"%SystemRoot%\System32\Wbem;";%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
python配置
{
"cmd": ["D:/Python/python.exe","-u","$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
}
C++配置
{
"cmd": ["g++", "-std=c++11","${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "run",
"cmd": ["cmd", "/c", "g++", "-std=c++11","${file}", "-o", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "${file_path}/${file_base_name} & pause"]
}
]
}
Java編譯腳本
可任意更改名字相當於一鍵編譯+運行的腳本
@echo off
cd%~dp1
echo Compiling %~nx1......
if exist %~n1.class (
del %~n1.class
)
javac %~nx1
if exist %~n1.class (
echo ------Output------
java %~n1
)
{
"shell_cmd": "runjavasublime.bat \"$file\"",//對應上面的腳本runjavasublime.bat
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java",
"encoding": "UTF-8"
}