file-templates
file-templates copied to clipboard
Petition Placeholder
Hiyas i like this addon but it need a placeholder to add code when is used the template like snippets using ${1:NameHolder} thanks :)
Yes, it's useful, and I also need prerepalce ${author},which defined at settings file。Thanks
+1~~~
I need ${datetime_now} place holder
If shortcuts are available to open special template is awesome, such as CMD + SHIFT + P to open php.tmpl, CONTROL + ALT + R to open ruby.tmpl
I will look into this shortly.
Are we thinking it best to have:
- named placeholders that correspond to some variable or function
- numbered placeholders for easy tabbing
I'm not sure this is what you mean by numbered placeholders, but prompting to replace $n when creating a file would be amazingly useful already for me:
class $1 {
private:
public:
$1();
~$1();
};
but if I could get a prompt asking "What should I replace ClassName with?" it could lead to more interesting templates. And would give them a little more sense too:
class ${ClassName} {
private:
public:
${ClassName}();
~${ClassName}();
};
Honestly, I vote for the second option, but wouldn't mind getting the first one.
The second option makes more sense to me.
I am aiming for it to popup during create with inputs for all your placeholders like you suggest. Its just getting time at the moment to work on it.
this feature would become another reason for me to leave webstorm once and for all.