Sublime Text SQL syntax to highlight temp table

For Sublime Text 2/3 by default the SQL syntax highlight will treat temp table like #tmpTable as comment, here’s how to adjust it to accept the temp table as part of highlight:

  1. Install OverrideAudit package
  2. After installation, press Ctrl-Shift-P and choose OverrideAudit: Create Override
  3. Then choose: SQL -> SQL.sublime-syntax, it will pop up the SQL.sublime-syntax yml file for editing
  4. Goto line 135: change the content from - match: "#" to - match: "# ", which means in SQL text file will treat “# ” as comment instead of only “#”

Now back to a sql file with temp table it will highlight the temp table name properly now.