Advertisement
Guest User

Sublime Syntax Highlighting for Source scripting

a guest
Aug 2nd, 2022
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. %YAML 1.2
  2. ---
  3. name: SourceCFG
  4. file_extensions: [cfg]
  5. scope: source.example-c
  6. version: 2
  7. contexts:
  8. main:
  9. # Comments begin with a '//' and finish at the end of the line
  10. - match: '//'
  11. scope: punctuation.definition.comment.example-c
  12. push: line_comment
  13.  
  14. # Keywords
  15. - match: '\b(alias|echo|bind|exec|wait)\b'
  16. scope: keyword.control.example-c
  17.  
  18. # Numbers
  19. - match: '\b(-)?[0-9.]+\b'
  20. scope: constant.numeric.example-c
  21.  
  22. # Aliases
  23. - match: '((?<=alias )|(?<=alias "))[^ ;"]+'
  24. scope: variable.parameter.c++
  25.  
  26. # Scripts
  27. - match: '(?<=exec )\w+'
  28. scope: entity.name.function.c++
  29.  
  30. # Semicolon
  31. - match: ';'
  32. scope: variable.function.c++
  33.  
  34. line_comment:
  35. - meta_scope: comment.line.example-c
  36. - match: $
  37. pop: true
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement