In these shots I had to build my own cursor since the snapshot didn't show the caret.
Here is my template:
You can see the cursor is supposed to be placed just before the parens...
I type "function", then hit CTRL-J to make that template replace my "function" text:
This is the result:
The caret is sitting 2 characters behind where I wanted it to be.
A work around in the interim is setting the caret to be 3 chars beyond where you want the insertion to land:
I think I've narrowed down the problem to be 'tab' characters and linefeed characters or a combination of whitespace characters. Single line templates work fine if they dont have whitespace:
Works fine. Odd..