Skip to content

Instantly share code, notes, and snippets.

@manuelzi
Forked from Steffo99/source-cfg.sublime-syntax
Created March 11, 2023 16:48
Show Gist options
  • Save manuelzi/6e375370b4789d21f166d2f2cc6b10fb to your computer and use it in GitHub Desktop.
Save manuelzi/6e375370b4789d21f166d2f2cc6b10fb 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