Skip to content

Instantly share code, notes, and snippets.

@Steffo99
Last active March 11, 2023 16:48
Show Gist options
  • Save Steffo99/fb689ce1da4d3f5b62a5f9cf9068257a to your computer and use it in GitHub Desktop.
Save Steffo99/fb689ce1da4d3f5b62a5f9cf9068257a to your computer and use it in GitHub Desktop.
Source .cfg files syntax highlighting for Sublime Text 3
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: Source game config
file_extensions:
- cfg
scope: source.source-config
contexts:
main:
- match: '\s*\/\/'
push: comment_line
- match: '[\s;]*(\S+)\s+"?([A-Za-z0-9.\-_ ]+)"?'
captures:
1: variable.source-config
2: string.unquoted.source-config
comment_line:
- meta_scope: comment.line.source-config
- match: '$'
pop: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment