Syntax Highligthing for dynare

Hi everyone,

I am new to dynare and I thought it would be nice to have a syntax highlitghing to make it easier to learn. I’ve looked around and I found that someone created a notepad++ file that does it. It works fine. However, it seems that there is no notepad++ for linux, and since I have a computer with linux, I was wondering if there is any other way to do highlighting: either another program that accepts user defined languages in the way notepad++ does or another implementation that works in linux


PS.: I am not sure if this topic is in the right category, but it does not seems to belong anywhere else. I apologize if I should have chosen another category.

Syntax Highlighting wozld be a nice feature, especially for DYNAREs macro language capacities, but I guess this is rather low priority for the team as Matlab highlighting is not that bad for dynare as well :wink:

You could try notepadqq which is basically a clone of notepad++ for windows, see e.g. Notepadqq and see if you can use the same language file you’re talking about.

You could also try to create your own syntax highlighting in atom (which is my favorite editor)… bit I guess that would be quite a lot of work…

I totally agree that it is probably low priority, but I thought that maybe someone did it so it could get easier for them to use.

I looked the notepadqq and I didn’t find an option for user defined language. However, I didn’t search a lot.

That would be quite a lot of work, but I did this for the main features I have found so far, which is not much.

Here is the github for this one: GitHub - danmrc/atom-dynare-language: Atom syntax highlighting for dynare. Under development

I appreciate any help.


Hi there,

We have emacs mode which is distributed in Dynare’s sources, but it doesn’t cover a lot of features and is full of bugs. We also have a (python) pygment which will be distributed soon (for 4.6 release) and will be used in the new reference manual (implemented in Sphinx).

Many thanks for the atom plugin. I am not a big atom fan but I will give it a try.


Reviving this old topic as Atom has been deprecated.

Has anyone heard of syntax highlighting for Dynare .mod files in VSCode?

Also, bizarrely, MATLAB editor no longer seems to support even basic syntax highlighting. I recall this feature working a couple years ago, but on my Macs they no longer seem to work.


1 Like

I tried using ChatGPT to write a json syntax highlighting file for VSCode. But alas, it was too much for my programming abilities.

In the end, however, I settled on using VSC, associating Dynare mod files to the MATLAB language (install the MATLAB extension in VSC), and then picking a dark theme. The end result isn’t 100% to my liking, but it’s a lot better than working with native Matlab or the base XML support in VSC.

1 Like