Last active
December 18, 2015 18:58
-
-
Save psyomn/5829147 to your computer and use it in GitHub Desktop.
rctl for vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Human { | |
| attributes { | |
| expirationDate : date; | |
| } | |
| operations { | |
| breathe() : void; | |
| } | |
| } | |
| /* You can comment in C/C++ ways too */ | |
| object Person is Human { | |
| /* List the operations that the person can do */ | |
| operations { | |
| +: | |
| talk() : void; | |
| drink(item : liquid) : void; | |
| eat(item : consumable) : void; | |
| annoy() : void; | |
| isAlive() : boolean; | |
| -: | |
| doSecretStuff() : void; | |
| #: | |
| myKidsWillInheritMyBaldness() : void; | |
| } | |
| /* List the attributes of the person */ | |
| attributes { | |
| name : string; | |
| surname : string; | |
| age : integer; | |
| flags : data8; | |
| } | |
| /* List the possible mixins */ | |
| mix { | |
| CommonBiologicalFunctions; | |
| } | |
| /* List particular constraints that the object has */ | |
| constraints { | |
| } | |
| } | |
| /* A bank account for example */ | |
| object Account { | |
| attributes { | |
| -: | |
| balance : double; | |
| } | |
| operations { | |
| +: | |
| deposit(amount : double) : void; | |
| withdraw(amount : double) : void; | |
| } | |
| constraints { | |
| balance >= 0; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " vim syntax file | |
| " Language: iuml (for plantuml) | |
| " Maintainer: psyomn | |
| if exists("b:current_syntax") | |
| finish | |
| end | |
| " Keywords | |
| syn keyword basicLanguageKeywords object is attributes operations mix package class | |
| syn keyword basicLanguageKeywords constraints void bool integer float double | |
| syn keyword basicLanguageKeywords private public protected | |
| syn keyword iumlBlockCmd constraints attributes operations object is mix | |
| syn keyword iumlBlockCmd private public protected package class | |
| syn keyword iumlType void boolean integer float double string | |
| syn keyword iumlType data8 data16 data32 data64 date | |
| syn match iumlNumber '\d\+' | |
| syn match iumlComment '/\*.*\*/' | |
| syn region iumlDescBlock start="{" end="}" fold transparent contains=iumlNumber, iumlBlockCmd, iumlType, iumlComment | |
| let b:current_syntax = "iuml" | |
| hi def link iumlBlockCmd Statement | |
| hi def link iumlType Type | |
| hi def link iumlComment Comment | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " vim syntax file | |
| " Language: Ruby Case Tools | |
| " Maintainer: psyomn | |
| " Latest Revision: Fri Jun 21 00:51:59 EDT 2013 | |
| if exists("b:current_syntax") | |
| finish | |
| end | |
| " Keywords | |
| syn keyword basicLanguageKeywords object is attributes operations mix | |
| syn keyword basicLanguageKeywords constraints void bool integer float double | |
| syn keyword basicLanguageKeywords private public protected | |
| syn keyword rctlBlockCmd constraints attributes operations object is mix | |
| syn keyword rctlBlockCmd private public protected | |
| syn keyword rctlType void boolean integer float double string | |
| syn keyword rctlType data8 data16 data32 data64 date | |
| syn match rctlNumber '\d\+' | |
| syn match rctlComment '/\*.*\*/' | |
| syn region rctlDescBlock start="{" end="}" fold transparent contains=rctlNumber, rctlBlockCmd, rctlType, rctlComment | |
| let b:current_syntax = "rctl" | |
| hi def link rctlBlockCmd Statement | |
| hi def link rctlType Type | |
| hi def link rctlComment Comment | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment