Skip to content

Instantly share code, notes, and snippets.

@prantu
Created November 27, 2016 18:37
Show Gist options
  • Save prantu/05b6cd9cb148ba9a6064c3891017ff3a to your computer and use it in GitHub Desktop.
Save prantu/05b6cd9cb148ba9a6064c3891017ff3a to your computer and use it in GitHub Desktop.
A custom build system to run Fortran (.f77, .f95, .f) on Sublime Text Editor with Gfortran compiler
{
"cmd": "gfortran ${file} -o ${file_base_name}",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.modern-fortran, source.fixedform-fortran",
"variants": [
{
"cmd": ["start", "cmd", "/k", "$file_base_name"],
"shell": true,
"name": "Run"
},
{
"cmd": "type ${file_name} & echo. & echo. & echo COMPILATION COMPLETE. & echo RUNNING... & ${file_base_name}",
"shell": true,
"name": "Code + Result"
}
]
}
@prantu
Copy link
Author

prantu commented Nov 27, 2016

Download Gfortran compiler for windows from here
Download Sublime Text 3 from here
Add gfortran binary folder to Environment Variables
Add this build system in Sublime, and DONE!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment