Insert blank line in code templates?

This should be easy, but…

How does one insert blank lines in a code template?

For example, the if/else template looks like this:

if (${condition}) {
	${cursor}
} else {
	
}

and I edited the template and want the final result to look like this:

if (${condition}) 
{
	${cursor}
} 
else 
{
	
}

but no matter what I try, it stays like the original. In fact, any code template I write, all my blank lines are ignored.

I’m beginning to think that the code templates are auto-formatted by the formatter when they are inserted, and since the formatter insists on keeping the “{” with the line and remove all blank lines (relates to my post on how you configure the javascript formatter), the template is ignored.

What am I doing wrong? Somebody bring me more coffee…

Yes, the auto format is applied, which makes the extra line disappear.

Paul

is there a way to comment out and then uncomment (i.e., disable & then enable) blocks of code? That would be useful. Perhaps it’s here in Eclipse somewhere, there are so many different features and cool things. Could you please remove some of these features?

seriously, it would be nice if we could type a template such as Gary’s trying to do, select all the lines and click a Disable button (yes, ok, fine, like FMP) that would result in:

//if (${condition})
//{
// ${cursor}
//}
//else
//{
//
//}

then after recalling the template, click an Enable button to remove the //s

if this is not there already, and is not a silly idea for some reason that exceeds my level of experience, I would be happy to file a feature request

try Control-/ and Control-Shift-/

Paul

Thanks for the tip. I will comment my templates, and uncomment them once inserted. Once control over the javascript code formatter is implemented, we can drop the use of comments in our templates and use this feature as originally intended.

pbakker:
try Control-/ and Control-Shift-/

:o

thanks!