jump.tf Forums
Welcome B)

CFG file syntax highlighting for Sublime Text 2

duppy · 2 · 9258

duppy

  • Newbie
  • *
    • Posts: 18
    • Frags: +0/-0
    • View Profile
Anybody use Sublime Text?  I made a very simple syntax highlighting "addon" for CFG script files.  It just highlights double-quoted strings, numbers, and a few keywords (alias, exec, bind, unbind, unbindall, echo, wait).  It's very very basic and far from anything perfect, but yeah...thought I'd share it anyway.

Download here

EDIT: This can now be installed with Sublime Package Control from here:
https://packagecontrol.io/packages/CFG%20Configuration%20Syntax%20Highlighting
or if that doesn't work, you can find it at GitHub here: https://github.com/aronj/CFGGameConfigurationSyntax

To install it, unzip and copy it to "C:\Users\Your User Name\AppData\Roaming\Sublime Text 2\Packages\User\" or wherever appropriate.  After that, any CFG file you open should have the syntax highlighting enabled...or you can select "TF2 CFG" (or User>TF2 CFG) in the bottom right of the status bar.

Screenshot (using the Tomorrow Night color scheme and Soda Dark theme):


YAML-tmLanguage code (not necessary, unless you want  to modify it and "re-compile" using the AAAPackageDev package):
Spoiler (click to show/hide)

Hope someone finds it useful ;)
« Last Edit: March 16, 2015, 05:15:17 AM by duppy »


stoopkid

  • Newbie
  • *
    • Posts: 2
    • Frags: +0/-0
    • View Profile