code completion is much better
I wonder whether an add-in can intercept keyboard messages, i.e. WM_CHAR and friends. The class of the main editor control is PC_SourceEdit, probably a superclassed edit control.
What I do in my own editor is quite simple:
- user types
space- WM_CHAR handler scans (rich) edit control text backwards until it hits something below "A"
- if the resulting short text, e.g.
mb, is found in a text file that contains entries like...
mb<TAB>MessageBox(0, "Hello", "Title", MB_OK)
... then the text to the right of TAB replaces the
mb. That works perfectly, and of course, the user can edit the text file and add whatever is needed for code completion.