1、ST3下安裝包管理工具Package Control
https://jingyan.baidu.com/article/3c343ff7dca2b10d3779633b.html
ST主界面下ctrl+ shift+ p,查找Package Control 並安裝
2、安裝SublimeFortran 語法高亮及檢查。##
https://github.com/315234/SublimeFortran
-
Open the command pallete via ctrl+shift+p (Win, Linux) or cmd+shift+p (OS X)
//打開控制面板 -
Choose Package Control: Install Package
//選擇Package Control: Install Package -
Choose Fortran
//選擇Fortran
The package will be installed and updated regularly by Package Control
//Package Control會自動安裝和維護Fortran插件
3、Build System 配置 編譯運行環境。##
-
新建一個build-system: Tools -> Build System -> New Build System...
-
配置代碼如下
{
"cmd" : ["D:\\CodeBlocks\\mingw64\\bin\\gfortran.exe","-g","${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex" :"^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir":"${file_path}",
"selector" : "source.f",
"encoding" : "cp936",
"variants" :
[
{
"name" : "Run",
"cmd" : ["cmd","/k","${file_path}/${file_base_name}.exe"]
},
{
"name" : "RunInCMD",
"cmd" : ["start", "cmd", "/k", "${file_path}/${file_base_name} &&echo. & pause && exit"]
}
]
}
其中RunInCMD 是在windows控制台cmd中運行(類似VS)
注意修改相應的路徑和文件名
build-system 配置命令如下
4、安裝sublimeGDB並配置##
https://blog.csdn.net/one___thousand/article/details/53219751
- 參考2,通過Package Control 安裝sublimeGDB插件
- 配置,ctrl + shift +p打開控制面板,打開Preference:SublimeGDB setting-user
{
"workingdir": "${folder:${file}}",
// put your arguments hear
"arguments": "",
// NOTE: You MUST provide --interpreter=mi for the plugin to work
"commandline": "D:\\CodeBlocks\\mingw64\\bin\\gdb.exe --interpreter=mi --args ./${file_base_name}"
}
按F5調出調試窗口
5、修改快捷鍵##
(待續)