Sublime text3 配置

環境變量

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編譯腳本

runjavasublime.batjdk取名runjavasublime.bat放入jdk目錄下在這裏插入圖片描述
可任意更改名字相當於一鍵編譯+運行的腳本

@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"
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章