default Python lexer not supporting line comment coloring?

Topics: Developer Forum
Jul 28, 2013 at 7:40 PM
Edited Jul 28, 2013 at 7:41 PM
Just checking to see if I'm overlooking something silly here... I've selected Python as my lexer and I'd assume out of the box # would be treated as a line comment and it'd show up as green - other syntax highlighting is working ok, brace matching etc...

I tried setting the line comment prefix to "#" manually and even added

scintillaCode.Styles[scintillaCode.Lexing.StyleNameMap["LINECOMMENT"]].ForeColor = System.Drawing.Color.Green;

just to be sure my assumption about color settings wasn't wrong - however nothing I do causes lines that start with # to be colored green.

Am I overlooking something simple?

(using latest bins downloaded this afternoon, BTW)
Jul 30, 2013 at 12:07 AM
Sorry, but I think the comment prefix character is hardcoded into the native C++ scintilla control. You could 1) try writing a custom lexer or 2) download the scintilla source ( and modify and recompile Scintilla.DLL and SciLexer.dll to support your new comments.