I am currently using Brackets (code editor) to create some C source files. It uses CodeMirror to handle the syntax highlighting and I have been attempting now for a while to try and add keywords to it.
I managed to add ‘printf’ as a keyword by modifying this code here and adding ‘printf’ to the keywords.
However, I would like to change the colour of it and haven’t been able to do this. How could I do this?
Also, in the same way as line comments such as ‘//’ highlight the whole line, I would like to also do this if the line starts with ‘#’, changing the colour as well.
I am pretty sure I need to modify the ‘clike.js’ file to add the new keywords and some other .css file in order to change the colours but I just can’t seem to work it out.
There is some text in the manual that describes how modes work. This blog post might also clarify some things. In general, some programming is required to change the behavior of a mode.