Closed xanderdunn closed 10 years ago
Type in the name of the function or event only as that will be replaced by the template for the function call or event. Alternatively use the command palette to trigger the snippets by typing in the name of the function or event.
This is due to how snippets work. The program in the package generates a snippet for each function or event that it finds in the .psc files it processes. Each snippet contains a keyword (the name of the function or event), which is used to trigger the snippet, and what to replace the keyword with in the text, which in the case of events is an entire event structure/template. For example the OnInit snippet has "OnInit" as its keyword so the first "Event" that you typed is completely ignored and "OnInit" is replaced by the contents, which contain the entire event structure, of the snippet.
I see. So, instead of typing Event OnI
, I should just type OnI
and it will complete correctly from there. That works great. I'll just retrain myself.
Steps to reproduce: Inside a Papyrus script, type
Event OnI
. You should see completion options, includingEvent OnInit
. Press Enter to select that completion option. You'll see that it inserts the completion text and you end up with:The initial
Event
keyword wasn't replaced so you end up withEvent Event
, which won't compile.