Syntax coloring in VSCode?

Use this forum to post Vensim related questions.
Post Reply
Travis
Senior Member
Posts: 167
Joined: Tue Jul 15, 2008 8:42 pm

Syntax coloring in VSCode?

Post by Travis »

We were editing CIN files and CMD files in Visual Studio Code and, after adding some comments in the CIN file, were wondering about syntax coloring.

Has anyone developed a VSCode extension and/or grammars or anything related to syntax coloring for Vensim and/or SD-related files (e.g., XMILE)?

More info about what we're thinking is here:
https://code.visualstudio.com/api/langu ... ight-guide

It would be great to open a CIN file or a MDL file and have syntax coloring in a powerful text editor.

Anyone attempt this?
Administrator
Super Administrator
Posts: 4667
Joined: Wed Mar 05, 2003 3:10 am

Re: Syntax coloring in VSCode?

Post by Administrator »

I think Max Kleeman has done something like this, but not using VS Code.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3856
Joined: Wed May 24, 2006 4:54 am

Re: Syntax coloring in VSCode?

Post by tomfid »

I did it once in Notepad++ ... I'll see if I can find it.
kleemax
Senior Member
Posts: 126
Joined: Tue Jan 26, 2016 3:50 pm
Vensim version: PRO

Re: Syntax coloring in VSCode?

Post by kleemax »

I did a contribution on this at the 2024 International System Dynamics Conference. I am attaching the conference paper and the presentation.

I have developed prototypes in Notepad++ together with a former colleague of mine, Julian Emmerich.
It's on github:
https://github.com/julianM5/vensim_syntax_highlighting

It is highly desirable that similar things be implemented for other text editors such as VSCode, BBedit etc.
It would also be cool to see this implemented in Vensim's equation editor, with a possibility to turn it on and off.
Attachments
R1117.pdf
(346.99 KiB) Downloaded 55 times
wip_Kleemann Syntax Highlighting with QR.pdf
(1.21 MiB) Downloaded 51 times
Post Reply