22" Language: Good old CFG files
33" Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru)
44" Last change: 2012 Aug 11
5+ " 2024 Nov 14 by Vim project: // only denotes a comment when starting a line (#16051)
56
67" quit when a syntax file was already loaded
78if exists (" b:current_syntax" )
@@ -27,17 +28,17 @@ syn match CfgSection "{.*}"
2728syn match CfgString " \" .*\" " contained
2829syn match CfgString " '.*'" contained
2930
30- " Comments (Everything before '#' or '// ' or '; ')
31+ " Comments (Everything before '#' or '; ' or leading '// ')
3132syn match CfgComment " #.*"
3233syn match CfgComment " ;.*"
33- syn match CfgComment " \/\/ .*"
34+ syn match CfgComment " ^ \s * \/\/ .*"
3435
3536" Define the default highlighting.
3637" Only when an item doesn't have highlighting yet
3738hi def link CfgOnOff Label
38- hi def link CfgComment Comment
39- hi def link CfgSection Type
40- hi def link CfgString String
39+ hi def link CfgComment Comment
40+ hi def link CfgSection Type
41+ hi def link CfgString String
4142hi def link CfgParams Keyword
4243hi def link CfgValues Constant
4344hi def link CfgDirectory Directory
0 commit comments