You can get different colors with something like this: local styles = StylesGetDefault() MarkupAddStyles(styles) styles.text.fg = {0, 0, 255} styles['**'].fg = {255, 0, 0} styles['_'].fg = {0, 255, 0} SetupKeywords(e,"lua",nil,styles,ide.font.oNormal,ide.font.oItalic) StylesApplyToEditor(styles,e,ide.font.oNormal,ide.font.oItalic) This will color the bold fragments green and italic fragments red while the rest of the text will be blue.
Wow, I feel pretty stupid for not having that idea, with all the things that I tried ;) I am at a different task right now, so I won't be able to try it before tomorrow I think, but that seems like a safe bet.
I tried and couldn't get it to work using your markup (^^* and ^^_), so I'm checking what may be causing this. It's not intended to work with the markup you have, but I'm curious as to why it wouldn't. Will update if I find the issue...
I also wondered. Could it be the EscapeMagic function? I am no regexp expert, but that does SOMETHING with ^.