Hi, I am new to blender dev (although I have been using blender for some time and know C++) and I’m interested in working on improving the text editor as a beginner task. I’d like to change some defaults(syntax highlight,etc) as well as more advanced editing features and keybindings. Where is the code that manages this? Any advice would be appreciated, as I have no clue where to start.
I am assuming that you are have downloaded the Blender source, are able to compile it, and edit it within some kind of IDE.
Most of what you want to play with is in source/blender/editors. In there, almost everything you want to look at is in the “space_text” folder. Inside there you will find that editor is defined and registered in “space_text.c”. It is mostly drawn in “text_draw.c” and you will find operators defined in “text_ops.c”.
It can be a bit daunting to start out, but a good exercise is hover some existing thing, grep some of the text, and follow it through. So for example, hover over the syntax highlight button and you will see reference to “show_syntax_highlight”. Grep that and you’ll get one useful hit, a property that really changes something called “showsyntax”. Grep that and you will see where that is defined and exactly how it is used.