Meteor code completion in file.js
In a js file, when I type the
Template.postItem.<tab>
I get
Template.postItem.helpers()
But I want
Template.postItem.helpers({
});
And the cursor in the middle line indented properly waiting for code writing. How can I get this to work as expected? thx
Please sign in to leave a comment.
You can probably create a live template for helpers() - see See http://blog.jetbrains.com/webide/2012/10/high-speed-coding-with-custom-live-templates/, https://www.jetbrains.com/webstorm/help/live-templates-2.html. This is the only way to customize code created on choosing methods from completion (as live templates are also available in completion popup)
Check out the Meteor JS Template plugin, it should help you do what you want.
I haven't used it much yet, but for your example you would type m then command+J to get a list of templates, I believe mhelp would be the template to generate the boilerplate for a template helper.