- Install Sublime text
- Install Control package (https://sublime.wbond.net/installation). Open console and paste the code of the previous web
- Reboot
- Install Sublimelinter (for fortran errors and color sintax): http://www.sublimelinter.com/en/latest/installation.html. Shift + CMD + P, Install packages: SublimeLinter
- Install package sublimelint (for fortran errors): (https://packagecontrol.io/packages/sublimelint). Shift + CMD + P, Install packages: sublimelint
Note: I'm supposing you have the gfortran compiler installed. If not, for example:
curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /
Code for Build: (Fortran_Build)
{
"cmd" : ["/usr/local/bin/gfortran ${file_name} -o ${file_base_name}.out"],
"selector" : "source.f90",
"working_dir" : "${file_path}",
"shell" : true
}
Code for Build and Run: (Fortran_Build_Run)
{
"cmd" : ["/usr/local/bin/gfortran ${file_name} -o ${file_base_name} && ./${file_base_name}"],
"selector" : "source.f90",
"working_dir" : "${file_path}",
"shell" : true
}
Code for Build in parallel with OpenMP: (Fortran_Build_openMP)
{
"cmd" : ["/usr/local/bin/gfortran -fopenmp ${file_name} -o ${file_base_name}.out"],
"selector" : "source.f90",
"working_dir" : "${file_path}",
"shell" : true
}
character*200::cwd,wd
integer len
CALL GETARG(0,cwd)
len=index(cwd,'/',back=.true.)-1
wd=cwd(:len)
wd=trim(wd)
CALL CHDIR(wd)
is this transferable to windows?
i have gfrotran from mingw64