Syntax highlighting? a) in Vensim, b) text exported from Vensim
Posted: Wed May 20, 2020 9:52 am
Syntax highlighting? a) in Vensim, b) text exported from Vensim
Vensim syntax can sometimes become cumbersome to understand (esp. if one tries to understand a model that someone else has built... )
Many programming languages feature text highlighting see:https://en.wikipedia.org/wiki/Syntax_highlighting, which makes understanding code much easier.
For example in Vensim it would be helpful if comments had a special color and built-in functions had a special color etc. Ideally different levels of nested parenthesis could also have differing colors.
"View as text" also contains headings if subgroups are defined for variables that could be colored.
I see two avenues with different time horizons:
a) on the medium to long term it would be helpful to have text highlighting implemented in Vensim (esp. "equation editor" and "view as text") Please let me know if I should I post this as a feature request somewhere else, too.
b) on the short term it would be easiest to export text (copy-paste) into a text editor that supports syntax highlighting. Importantly, the text editor would need support defining custom syntax highlighting for programming languages that are not already included with the software. I wonder if anyone has ever used this approach? Is there a format for the definition of syntax highlighting that can be shared (exported by one text editor and imported by another one)? Inter-operability between Windows and Mac would also be desirable in this sense.
Vensim syntax can sometimes become cumbersome to understand (esp. if one tries to understand a model that someone else has built... )
Many programming languages feature text highlighting see:https://en.wikipedia.org/wiki/Syntax_highlighting, which makes understanding code much easier.
For example in Vensim it would be helpful if comments had a special color and built-in functions had a special color etc. Ideally different levels of nested parenthesis could also have differing colors.
"View as text" also contains headings if subgroups are defined for variables that could be colored.
I see two avenues with different time horizons:
a) on the medium to long term it would be helpful to have text highlighting implemented in Vensim (esp. "equation editor" and "view as text") Please let me know if I should I post this as a feature request somewhere else, too.
b) on the short term it would be easiest to export text (copy-paste) into a text editor that supports syntax highlighting. Importantly, the text editor would need support defining custom syntax highlighting for programming languages that are not already included with the software. I wonder if anyone has ever used this approach? Is there a format for the definition of syntax highlighting that can be shared (exported by one text editor and imported by another one)? Inter-operability between Windows and Mac would also be desirable in this sense.