syntax keywords are supposed to be - well - keywords. Initially, this meant, it must match the definition of the 'iskeyword' option, which usually does not include the quotation mark. Some years later, the iskeyword option has been de-coupled from the syntax highlighting option and now one can use the
:syn iskeyword command to specify the iskeyword option only for syntax highlighting (which falls back to the
iskeyword) option, if it is not specified.
To make this possible, you can add the
? to the syntax definition of a keyword by using
This uses the expression-register = to get the current value of the
iskeyword option and adds the
? to it.
Note however, this can have unwanted consequences to your syntax highlighting, depending on the patterns used in the syntax definitions.