Can I highlight some words with a regex?

CodeLite installation/troubleshooting forum
fanhe0513
CodeLite Enthusiast
Posts: 39
Joined: Sat Aug 21, 2010 7:32 pm
Genuine User: Yes
IDE Question: c++
Contact:

Can I highlight some words with a regex?

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can I highlight some words with a regex?

Post 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
Make sure you have read the HOW TO POST thread
Post Reply