Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
6

Notepad++ for eQuest and EnergyPlus - Syntax highlighting, navigation pane and code folding

asked 2015-05-20 06:53:46 -0600

updated 2017-05-03 21:39:49 -0600

I use Notepad++ for energy modeling on a daily basis, with both eQuest and EnergyPlus.

Those two programs have something in common: the input file is text-based, and it's quite long.

I found myself wanting two things: syntax highlighting to be able to quickly see the important keywords while scrolling down, and some kind of navigation pane in order to quickly reach a selected section of a file.

Code folding could potentially be useful as well

How can you achieve all of that in notepad++?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
13

answered 2015-05-20 06:57:23 -0600

In order to achieve syntax highlighting, I've simply created user defined languages.

In order to achieve a navigation pane, I had to use an advanced function of Notepad++ called Function List.

What you'll get out of it will look like this:

Navigation and Syntax Highlighting

One the above picture you can see syntax highlighting on an eQuest Input File (.inp). To the right, you have the "Function List" pane that serves as a navigation pane: - You get classes (major sections) - You can expend them to get an anchor to any specific object

Similar results are obtained for EnergyPlus as well.

For E+, I also have a macro to achieve code folding should you need it.

For the files as well as as installation guidelines, please go to my Github repository, where the readme should explain everything you need to know.

edit flag offensive delete link more

Comments

Thanks Julien for putting this out in the open!

Daniel's avatar Daniel  ( 2015-05-20 12:42:41 -0600 )edit
1

Thanks for sharing this Julien. This is very usefull!!

Samuel de Vries's avatar Samuel de Vries  ( 2017-08-29 03:52:30 -0600 )edit

Note that this only works with .idf files that are created by the IDFEditor. I tried over and over to use it on a file I created geometry in using Euclid, and also on .idf files created through CBECC-Com. I finally tried one created in the IDFEditor and thats when it finally worked. Thank you! Very useful tool.

Anna Osborne Brannon's avatar Anna Osborne Brannon  ( 2018-01-04 00:58:45 -0600 )edit
1

The README does say that, perhaps not in the right location though (see Code Folding). You can just load the file in IDF editor, change the version, save, and change back the version. Make sure you save as "Sorted" in the preferences.

Julien Marrec's avatar Julien Marrec  ( 2018-01-04 08:11:22 -0600 )edit

In the latest versions of notepad++ getting the function folding with a function list to work requires also describing the association between the function list and the user defined language in the file: overrideMap.xml. See this description.

Samuel de Vries's avatar Samuel de Vries  ( 2023-10-16 06:28:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

6 followers

Stats

Asked: 2015-05-20 06:53:46 -0600

Seen: 1,324 times

Last updated: May 20 '15