SQL Syntax Highlighter Error ('#' does NOT preface a comment)

Tomáš Krůta 7 years ago • updated by Gary Hall 7 years ago 2
The rest of a line after a number sign '#' is wrongly highlighted as comment now.
A single number sign '#' prefixes names of local temporary tables. They should be highlighted the same way (or at least similar) as tables are.
And a double number sign '##' prefixes names of global temporary tables...

 This can be be fixed if you go to the packages folder (Preferences/Browse Packages), the file SQL.tmLanguage contains all the syntax highlighting settings.

Around Ln 387 there is a Key match, and a string that contains (#).*$\n? (or something very similar)

if you remove both the keys and string entries, you can make the # not be a comment 

I would recommend creating a back up of the file just in case something goes wrong

Hope this helps.


If you would also like to preserve # as a comment prefix when used at the beginning of a line then just add a caret to the start of the regex like so: ^(#).*$\n?