Adds syntax highlighting and snippets to Modelica files in Atom.
The grammar was partially created using an automatic conversion from the Modelica grammar for Sublime Text by Boris Chumichev.
Current code shortcuts (type given keyword + tab):
|/*||for block comments|
|class||for class block|
|for||for a for loop block|
|function||for function block|
|if||for a conditional block|
|model||for model block|
|package||for package block|
|record||for record block|
|when||for a when event block|
|while||for a while loop block|
Two commands are available to toggle folding of individual annotations or all annotations:
toggleannotations-- The cursor must be on the first row of the annotation.
toggleallannotations-- Toggles all annotations in the buffer.
The HTML documentation in a file can be shown with the
Here is an example showing syntax highlighting, toggling annotations, and documentation view.
There are no default keymappings included. Here is one suggestion:
'atom-text-editor[data-grammar="source modelica"]:not([mini])':'tab': 'language-modelica:toggleannotations''shift-tab': 'language-modelica:toggleallannotations''ctrl-shift-j': 'language-modelica:toggledocview'
toggleannotations is a "DWIM" function, meaning if the cursor is not on the
first line of an annotation, the keypress passes through to the next key
mapping assigned. So, when assigned to TAB as above, TAB will still normally
work right for indentation and for completion of snippets and other uses.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.