I defined my own SQL MIME types so that SQL functions like min, max, ucase are identified as keywords (cm-keyword style will be applied; in my case it’s uppercased and purple) and SQL keywords like select, from, order as builtin (cm-builtin style will be applied; in my case it’s uppercased and darkblue).
However in Access ASC is both a SQL function (it returns the ASCII code for a char) and a “SQL keyword” (for sorting a record set ascending) as can be seen in following example:
Notice that ASC, in the query above, is in both cases identified as builtin. I want the first ASC (in the SELECT) to be identified as a SQL function and therefore cm-keyword.
How can I override the style that when ASC(…) is being typed cm-keyword is used and when ASC without (…) is typed cm-builtin is used?
The solution of course still needs to work if copy/paste is done or when the text changes for whatever reason.