Coder Social home page Coder Social logo

wushuaibuaa / atom-language-modelica Goto Github PK

View Code? Open in Web Editor NEW

This project forked from modelica-tools/atom-language-modelica

0.0 2.0 0.0 5.11 MB

Modelica language support for the atom editor

Home Page: https://atom.io/packages/language-modelica

License: Other

CoffeeScript 92.19% CSS 7.81%

atom-language-modelica's Introduction

Modelica language support in Atom

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.

Snippets

Current code shortcuts (type given keyword + tab):

keyword description
/* for block comments
block for block
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

Toggling annotations

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.

Documentation view

The HTML documentation in a file can be shown with the toggledocview command.

Example

Here is an example showing syntax highlighting, toggling annotations, and documentation view.

language-modelica in action

Key mappings

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.