Adds syntax highlighting support for .cfg
files
Example config
Plain Text | Using the Monokai Pro theme |
- Used in say, echo & exec.
- Normal text, alias commands, unrecognized commands.
-
- ConVar constants, numbers.
-
MOUSE1
,SPACE
,F3
- Comments
-
-
-
Action commands:
+attack2
,-jump
,+use_action_slot_item
. -
Argument action commands:
wait 3
,taunt_by_name Taunt: Schaudenfreunde
,addcond 91
. -
Trigger action commands:
kill
,mp_forcewin
,voice_menu1
.
-
Action commands:
-
-
Console commands:
mat_picmip
,sv_cheats
,sensitivity
. -
Addon commands:
prec_mode
.
-
Console commands:
-
-
Deprecated commands and actions:
g_ragdoll_fadespeed
,god
,mat_parallaxmap
.
- Download VS Code
-
Install the extension
-
Press reload
- Open a
.cfg
file - Click at the bottom right to change its "File Association" (Or press
Ctrl+K, Ctrl+M
) - Select,
Configure File Association for '.cfg'...
- Select
TF2 cfg
from the list
You can open your user settings (Ctrl+,
) and add
"files.associations": {
"*.cfg": "TF2 cfg"
}
Note that you can change/control the Color Theme:
- 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)
- Improved regular expression.
- Added matches for all Team Fortress 2 commands.
- Improved syntax highlighting for strings and command chains.
- Shortened regex.
- Improved syntax highlighting for themes.
- Renamed the settings rule to commands.
- Fixed bind and unbind key regular expression.
- Added regular expression for
set*
commands. - Created a pattern for echo strings
- Fixed partial variable rule matches inside strings.
- Added several more matches for TF2, P-REC, and HLAE commands.
- Improved regular expression
This is free is all senses of the word. UNLICENSE