Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CSGO .cfg Syntax HighlightingNew to Visual Studio Code? Get it now.
CSGO .cfg Syntax Highlighting

CSGO .cfg Syntax Highlighting

dirt_lxiv

|
10,219 installs
| (4) | Free
Syntax support for Source Engine scripting
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CSGO cfg syntax highlighting

Adds syntax highlighting support for .cfg files

Features

autoexec.cfg from my config config

Example without syntax highlighting Example with syntax highlighting
Plain Text Using the CSGO .cfg syntax highlighting

This is the grammar I'm tagging:

  • Comment
  • Command
    • Unknown (deprecated, unused, or just unknown)
    • Buttons/Keys (SPACE, MOUSE1)
    • Actions (+attack, say_team)
    • Settings (alias, bind, net_graph, etc)
  • Numeric-Literal
  • Variable (custom commands)
  • Macros ("+jump; +duck; +attack;")
  • Punctuation-Semicolon

Install

  1. Download VS Code
  2. Install the extension

    Install through VS Code

Setup

  1. Open a .cfg file
  2. Click at the bottom right to change its "File Association" (Or press Ctrl+K, Ctrl+M)
  3. Select, Configure CSGO cfg language based settings...

Or open your user settings (Ctrl+,) and add

"files.associations": {
  "*.cfg": "CSGO cfg"
}

Known Issues

  • Not all commands have been included yet
  • Lazy regex checking, such as r_\\w+ to mark anything that starts with r_, but really should only include exact commands
  • My regex has not been reviewed and there's potentially a smarter way to be doing some of the things
  • Ideally there'd be a custom color theme with property scope names (currently I'm using at least one .js name)

Release Notes

v0.0.2

  • Updated Images

v0.0.1

  • First Release
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft