sublime test 3 配置安裝fortran開發環境


1、ST3下安裝包管理工具Package Control

https://jingyan.baidu.com/article/3c343ff7dca2b10d3779633b.html

ST主界面下ctrl+ shift+ p,查找Package Control 並安裝

2、安裝SublimeFortran 語法高亮及檢查。##

https://github.com/315234/SublimeFortran

  1. Open the command pallete via ctrl+shift+p (Win, Linux) or cmd+shift+p (OS X)
    //打開控制面板

  2. Choose Package Control: Install Package
    //選擇Package Control: Install Package

  3. Choose Fortran
    //選擇Fortran

The package will be installed and updated regularly by Package Control
//Package Control會自動安裝和維護Fortran插件

3、Build System 配置 編譯運行環境。##

  1. 新建一個build-system: Tools -> Build System -> New Build System...

  2. 配置代碼如下

{  
    "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

  1. 參考2,通過Package Control 安裝sublimeGDB插件
  2. 配置,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、修改快捷鍵##

(待續)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM