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.

Revisions

  1. @Steffo99 Steffo99 revised this gist Jan 11, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions source-cfg.sublime-syntax
    Original file line number Diff line number Diff line change
    @@ -7,9 +7,9 @@ file_extensions:
    scope: source.source-config
    contexts:
    main:
    - match: '\/\/'
    - match: '\s*\/\/'
    push: comment_line
    - match: '(\S+)\s+"?([A-Za-z0-9.\-_ ]+)"?'
    - match: '[\s;]*(\S+)\s+"?([A-Za-z0-9.\-_ ]+)"?'
    captures:
    1: variable.source-config
    2: string.unquoted.source-config
  2. @Steffo99 Steffo99 created this gist Jan 11, 2018.
    19 changes: 19 additions & 0 deletions source-cfg.sublime-syntax
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    %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: '\/\/'
    push: comment_line
    - match: '(\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