Auto fill within live templates
已回答
Hey folks,
Our code guidelines require we demarcate sections of code with comments such as:
// ----- public methods ------------------------------------------ (out to 78 chars max)
Is there a way to create a live template that would allow me to insert the name, but always fill the dashes to 78 no matter what name I insert?
Thanks,
-rl
请先登录再写评论。
Should be possible with the use of the groovyScript function for the variable: https://www.jetbrains.com/help/idea/template-variables.html .
You could write a script that will pad the text with the dashes to the desired length.