Page 1 of 1

Can I highlight some words with a regex?

Posted: Sat Dec 11, 2010 12:50 pm
by fanhe0513
As the title, I want highlight all c functions with a regex, as the workspace tags coloring always works not so well.

I found the lexer's state Id named "wxSCI_C_REGEX" in wxscintilla.h, but I don't know how to use.

Code: Select all

// Lexical states for SCLEX_CPP
#define wxSCI_C_DEFAULT 0
#define wxSCI_C_COMMENT 1
#define wxSCI_C_COMMENTLINE 2
#define wxSCI_C_COMMENTDOC 3
#define wxSCI_C_NUMBER 4
#define wxSCI_C_WORD 5
#define wxSCI_C_STRING 6
#define wxSCI_C_CHARACTER 7
#define wxSCI_C_UUID 8
#define wxSCI_C_PREPROCESSOR 9
#define wxSCI_C_OPERATOR 10
#define wxSCI_C_IDENTIFIER 11
#define wxSCI_C_STRINGEOL 12
#define wxSCI_C_VERBATIM 13
#define wxSCI_C_REGEX 14
#define wxSCI_C_COMMENTLINEDOC 15
#define wxSCI_C_WORD2 16
#define wxSCI_C_COMMENTDOCKEYWORD 17
#define wxSCI_C_COMMENTDOCKEYWORDERROR 18
#define wxSCI_C_GLOBALCLASS 19

Re: Can I highlight some words with a regex?

Posted: Sat Dec 11, 2010 6:19 pm
by eranif
No, you can't color words using regex. What you find is an internal ID of what scintilla thinkgs is a regular string. You can't provide a regex and codelite will color it

Eran