Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save and7ey/3d5c4f82815b3580cfcd3da28de3a796 to your computer and use it in GitHub Desktop.
Save and7ey/3d5c4f82815b3580cfcd3da28de3a796 to your computer and use it in GitHub Desktop.
Google App Engine Server Log Syntax Highlighting
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: GAE Dev Server Log
file_extensions: [log]
scope: source.example-c
contexts:
main:
# Strings begin and end with quotes, and use backslashes as an escape
# character
- match: '"'
scope: punctuation.definition.string.begin.example-c
push: double_quoted_string
# Comments begin with a '//' and finish at the end of the line
- match: '//'
scope: punctuation.definition.comment.example-c
push: line_comment
# Keywords are if, else for and while.
# Note that blackslashes don't need to be escaped within single quoted
# strings in YAML. When using single quoted strings, only single quotes
# need to be escaped: this is done by using two single quotes next to each
# other.
- match: '\b(if|else|for|while)\b'
scope: keyword.control.example-c
# Numbers
- match: '\b(-)?[0-9.]+\b'
scope: constant.numeric.example-c
double_quoted_string:
- meta_scope: string.quoted.double.example-c
- match: '\\.'
scope: constant.character.escape.example-c
- match: '"'
scope: punctuation.definition.string.end.example-c
pop: true
line_comment:
- meta_scope: comment.line.example-c
- match: $
pop: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment