Skip to content

Instantly share code, notes, and snippets.

@eric-wieser
Created May 8, 2016 15:19
Show Gist options
  • Save eric-wieser/1cd2919483d18d6b3788a54dec4f165c to your computer and use it in GitHub Desktop.
Save eric-wieser/1cd2919483d18d6b3788a54dec4f165c to your computer and use it in GitHub Desktop.
Basic syntax highlighting for message files
%YAML 1.2
---
name: ROS message definition
file_extensions: [msg]
scope: source.rosmsg
contexts:
main:
- match: \#.*$
scope: comment.line.rosmsg
- match: ^\s*(bool|int8|uint8|int16|uint16|int32|uint32|int64|uint64|float32|float64|string|time|duration)\b
scope: storage.type.rosmsg
- match: \b([A-Z_]+)\s*=\s*(\d+)
captures:
2: constant.numeric.integer.rosmsg
@gavanderhoorn
Copy link

Have you considered submitting this to package control?

@eric-wieser
Copy link
Author

@gavanderhoorn: It's been a while since I've submitted a package. Next time I'm using ros, I'll try and improve this a little, and then submit it

@adrianohrl
Copy link

how do I use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment