Skip to content

tmatijevich/language-as-structured-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StructuredText Language Package for ATOM

Version Downloads License

ATOM support for IEC 61131-3 Structured Text and Automation Studio (AS) projects including syntax highlighting, snippets, and auto-completion.

Features

Syntax Highlighting

  • Comments (inline //, block (* *))
  • Keywords
    • Statement-flow (IF, ELSE, CASE, FOR, ...)
    • Operators (AND, OR, <, >, +, -, ...)
    • Storage (PROGRAM, FUNCTION, VAR, TYPE, ...)
  • Strings 'Hello Word!'
  • Numbers 16#ff, 75.0, T#250ms
  • Function & Function Block calls strcpy()
  • Structure members System.Parameters
  • User constants IN_TO_MM (all uppercase)

Highlighting example

Snippets

  • cm - Block comment
  • if - If statement
  • else - If else statement
  • elsif - If, else, elsif statement
  • for - For loop
  • case - Case statement
  • while - While loop
  • repeat - Repeat loop
  • fn - Function definition
  • fb - Function block definition
  • prog - Program definition

Auto-Complete

  • Auto-capitalization
    • Sets keywords to all caps when cursor changes line in text editor

Auto-capitalization example

Installation

Install the latest release,

apm install language-as-structured-text

or clone the repository for the latest changes.

git clone https://github.com/tmatijevich/language-as-structured-text.git

Link as a development package with ATOM to make custom changes.

apm link -d

Then run ATOM in development mode.

atom -d

Plugins

I recommend the following add-on packages for programming in ATOM

Upcoming

  • Autocomplete provider of variables, types, and functions

About

Atom support for IEC 61131-3 Structured Text and Automation Studio projects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published