Page 1 of 1

V Language Document Type

Posted: Thu Nov 02, 2023 5:50 am
by Dataflex
I didn't see the V language in Options->Document Types, so tried to create one. But I got an error that it already existed. In looking at c:\Program Files (x86)\Zeus\zConfig I see: [Zeusv-keywords.ext , Zeusv-template.ext ]. But there is no compiler, general or coloring file.

Re: V Language Document Type

Posted: Thu Nov 02, 2023 6:34 am
by jussij
The error message is telling you that v file extension is already mapped so you can't create a new document type for that file extension.

Because the file extension is used as the key to identify the matching document type, that extension can only ever live in one document type.

And in this case the error message is correct because that v file extension is mapped to the Verilog Document Type.

So there are three options:
  1. Use the Options, Document Types menu to delete the Verilog Document Type and then create your own replacement.
  2. Edit the Verilog Document Type, adding in the required compiler details to that document type.
  3. Edit the Verilog Document Type and remove the v file extension from the General tab. That will then let you then create a new V Document Type for that file extension.
Cheers Jussi

PS: An easy way to check which file extension is mapped to which document type is to open a file with that extension and then use the Options Properties menu to display the document type for that file extension:
doc-type.png
doc-type.png (123.76 KiB) Viewed 36216 times

Re: V Language Document Type

Posted: Thu Nov 02, 2023 7:17 am
by Dataflex
I decided to choose option 3 (deleting the V file extension from Verilog) even though I will never use the Verlog document type... But I was unable to create a V document type as it still said it existed. I exited Zeus, came back in and checked the Verilog Document Type and it showed only v2k as a file extension. But still couldn't add a V document type. I notice that there are two zConfig files that appear to be for a V language or V extension: Zeusv-keywords.ext and Zeusv-coloring.ext.


Verilog_properties.png
Verilog_properties.png (25.27 KiB) Viewed 36211 times
Zeus_DocumentTypes_V_exists.png
Zeus_DocumentTypes_V_exists.png (30.54 KiB) Viewed 36211 times
The attachment Verilog_properties.png is no longer available

Re: V Language Document Type

Posted: Thu Nov 02, 2023 7:30 am
by jussij
When I create a new V document type for the v file extension this is the message I got:
v-err.png
v-err.png (97.92 KiB) Viewed 36206 times
What this message is saying is a configuration file for that file extension already exists and Zeus will add a dummy file extension to allow the document type to be created and saved to disk (more about this later).
That then lets me create the new document type and you can see the dummy file extension has been used to create the document type:
v-ok.png
v-ok.png (112.32 KiB) Viewed 36206 times
And looking in the config folder we see these original Verilog document type files:

Code: Select all

02/11/2023  06:19 PM               252 Zeusv-general.ext
17/09/2020  05:34 PM               364 Zeusv-keywords.ext
10/09/2020  11:23 PM               348 Zeusv-template.ext
And the newly created document type using that dummy file extension to avoid the file name collision:

Code: Select all

02/11/2023  06:21 PM               243 Zeusz_v-general.ext
Cheers Jussi

Re: V Language Document Type

Posted: Thu Nov 02, 2023 7:33 am
by jussij
Looking at your images, I am not sure why you are not getting the same error message that I am getting.

In any case the work around would be to create a new document type with these file extensions:

Code: Select all

z_v;v;
After the document type is created, you can then edit that new document type and remove the dummy file extension:

Code: Select all

v;
Cheers Jussi

Re: V Language Document Type

Posted: Thu Nov 02, 2023 7:32 pm
by Dataflex
I added z_v and now I have a V Document Type. Thanks! (I did notice that after I removed the z_v the files in zConfig for them remained, even after restarting Zeus. But I was able to deleted them in File Explorer.)

Re: V Language Document Type

Posted: Thu Nov 02, 2023 11:56 pm
by jussij
But I was able to deleted them in File Explorer.)
As you have found, it is safe to use Explorer to delete these configuration files.

My only suggestion is to occasional backup the whole zConfig folder and the easiest way to do this zipping the entire zConfig folder and then renaming the zip file to include date information.

Cheers Jussi