Page 1 of 1

Fortran include files syntax highlighting

Posted: Thu Jan 07, 2021 11:24 am
by dante123
How do I make the Fortran highlighting function working on my include files?
The fortran files with extension .for or .f90 are highligthed, but not my include files ( *.inc)

I'm using .inc to separate include and source files, for me and so the IDE does not understand include files as source files (or it tries to compile them)

Re: Fortran include files syntax highlighting

Posted: Fri Jan 08, 2021 5:45 am
by martinv
Open the settings panel (Ctrl-,) choose "Workspace" (or "User"), extend "Text Editor", select "Files", and add an item *.inc with value vms-fortran.

Or directly: Edit .vscode/settings.json and set

Code: Select all

{
  "files.associations": {
    "*.inc": "vms-fortran",
  },
}

Re: Fortran include files syntax highlighting

Posted: Mon Jan 11, 2021 7:48 am
by dante123
Thanks,
it works now, I was missing the "vms-".