Fortran include files syntax highlighting

Here you can discuss the universal Integrated Development Environment for OpenVMS.
Post Reply

Topic author
dante123
Member
Posts: 7
Joined: Thu Jan 07, 2021 10:55 am
Reputation: 0
Status: Offline

Fortran include files syntax highlighting

Post by dante123 » Thu Jan 07, 2021 11:24 am

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)

User avatar

martinv
Master
Posts: 101
Joined: Fri Jun 14, 2019 11:05 pm
Reputation: 0
Location: Goslar, Germany
Status: Offline
Contact:

Re: Fortran include files syntax highlighting

Post by martinv » Fri Jan 08, 2021 5:45 am

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",
  },
}
Working hard for something we don't care about is called stress;
working hard for something we love is called passion.
(Simon Sinek)


Topic author
dante123
Member
Posts: 7
Joined: Thu Jan 07, 2021 10:55 am
Reputation: 0
Status: Offline

Re: Fortran include files syntax highlighting

Post by dante123 » Mon Jan 11, 2021 7:48 am

Thanks,
it works now, I was missing the "vms-".

Post Reply