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、修改快捷键##

(待续)

posted @ 2018-10-22 10:38  akai0017  阅读(2304)  评论(0编辑  收藏  举报