Skip to content

Instantly share code, notes, and snippets.

@stklcode
Created November 28, 2018 11:36
Show Gist options
  • Save stklcode/6bd0009c366bef0234b1c3fc91cd9050 to your computer and use it in GitHub Desktop.
Save stklcode/6bd0009c366bef0234b1c3fc91cd9050 to your computer and use it in GitHub Desktop.
VIM syntax definition for PLEXIL language. Place this file in your ~/.vim/syntax directory and add "au BufRead,BufNewFile *.ple set ft=plexil" to a second new file ~/.vim/ftdetect/plexil.vim
" Vim syntax file
" Language: PLEXIL
if exists("b:current_syntax")
finish
end
syn keyword pleBoolean true false
syn region pleString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+
syn match pleNumber "[0-9][0-9]*"
syn keyword pleIdentifier Concurrence Command LibraryAction SynchronousCommand LibraryCall Lookup LookupNow LookupOnChange SkipCondition StartCondition InvariantCondition ExitCondition EndCondition RepeatCondition String Integer Real Boolean Wait In
syn keyword pleKeyword if elseif else endif while for
syn keyword pleConstant INACTIVE WAITING EXECUTING FINISHING ITERATION_ENDED FAILING FINISHED
syn match pleNode "[^: ][^: ]*\:"
syn match pleComment "//.*"
syn region pleMultiComment start="/\*" end="\*/"
syn keyword pleType Boolean Integer Real String
hi link pleComment Comment
hi link pleMultiComment Comment
hi link pleType Type
hi link pleBoolean Boolean
hi link pleString String
hi link pleNumber Number
hi link pleStatement Statement
hi link pleKeyword Keyword
hi link pleConstant Constant
hi link pleNode Identifier
hi link pleIdentifier Special
let b:current_syntax = "plexil"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment