fortransublimetext3sublimelinter

How to make sublime text see .mod files in different folders?


In my program I use multiple module files. In order to keep main folder clean I moved all of them in separate folders and made necessary changes to my shell script. Everything was done correctly as now I am able to compile and run the program. Unfortunately, Sublime Text 3 doesn't see .mod files located not in the main folder. On lines like this:

use mymodule

it says:

Fatal Error: Can't open module file ‘mymodule.mod’ for reading at (1): No such file or directory

How can I fix this?


Solution

  • In Sublime Text go to Preferences->Package Settings->SublimeLinter->Settings - User. There in the block "gfortranfixedform" or "gfortranmodern" (depends on what form you are using) add an argument: "args": ["-Ipath/to/modfiles"], where path/to/modfiles is a directory with your .mod files.