Need help with custom syntax highlighting for a simple example, struggling to understand how.
stmav last edited by stmav
Text file will look like this, each chat message appears on its own line:
[2021/07/18 18:57] Mango: Hi how are you apricot?
[2021/07/18 18:58] Apricot (meow123): Doing well thank you mango
[2021/07/18 18:59] Apple (fruitfruit123): Hi guys how are you?
How do I customize so I can have 3 different colors based on the syntaxing above? Basically I want:
- The timestamp to be a light grey color
- The username to be red, meaning “Mango” and “Apricot (meow123)” are usernames
- The text messages (everything after the : in the username) to be black?
Bonus points if it’s possible to insert spacing between the username and the chat messages!
Ekopalypse last edited by
Sorry, but this is hardly possible with the built-in UDL since parts
are dynamic and UDL does not provide regex terms to identify different parts.
You have to write your own lexer for this case.
A scripting plugin like PythonScript can be used to make this possible.
If you are familiar with another programming language there may be ways to use it as well.