Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Syntax Highlighting for external editors

GrisoMG edited this page Nov 23, 2016 · 9 revisions

OpenHAB has a great development environment with the "openHAB Designer". But in some cases you want to use another editor to make changes to the configuration files of openHAB. To make this more effectiv there are some files to enable syntax highlighting for openHAB-files in these editors.

mcedit

mcedit is an editor which comes with mc (Midnight Commander).

Installing the syntax-files

    file ..\*\\.(items)$ openHAB\sItems 
    include openhab-items.syntax  
     
    file ..\*\\.(sitemap)$ openHAB\sSitemap 
    include openhab-sitemap.syntax
     
    file ..\*\\.(persist)$ openHAB\sPersistence
    include openhab-persist.syntax
     
    file ..\*\\.(rules)$ openHAB\sRules
    include openhab-rules.syntax 
  • edit the Debian-line from file (rules|rocks)$ Debian\srules to file (rocks)$ Debian\srules because it interferes with openHABs rules-files.

Screenshots

Items Rules Sitemap

Notepad++

Notepad++ Version 6.2 or above is required to support UDL2 (User Defined Language v2).

Comments

color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//." color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/"# Comments color brightgreen "//.*" color brightgreen start="/*" end="*/" color brightgreen start="/**" end="*/" http://notepad-plus-plus.org/news/notepad-6.2-release-udl2.html

How to import UDL2-files?

Import

Screenshots

Items Rules Sitemap

vi

Installing the syntax-files

Automatic installation

Paste the following code into a commandline

mkdir -p ~/.vim/{ftdetect,syntax} && \
curl -L -o ~/.vim/syntax/openhab.vim https://github.com/cyberkov/openhab-vim/raw/master/syntax/openhab.vim && \
curl -L -o ~/.vim/ftdetect/openhab.vim https://github.com/cyberkov/openhab-vim/raw/master/ftdetect/openhab.vim

Manual installation

nano

Nano is a common editor in linux systems

Installing the syntax-files

  • Download the syntax file openhab.nanorc from https://github.com/airix1/openhabnano
  • place them in your nanorc directory ie: ~/.nano or /usr/share/nano. Then simply include the openhab.nanorc file in your ~/.nanorc or /etc/nanorc file ie:
## Openhab
include /usr/share/nano/openhab.nanorc

Textwrangler

Textwrangler is a text and code editor for MAC OS X.

Manual installation

Installation


User Interfaces


Community

(link to openHAB forum)

Development



Misc


Samples

A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.

Please update the wiki if you do come across any out of date information.

Use case examples

Collections of Rules on a single page

Single Rules

Scripts


Release Notes

Clone this wiki locally