Photo of Aaron West

aaron west

technology | programming | life

Aaron West

2-Minute Read

Earlier this week I was trying to create a new ColdFusion Builder snippet that would insert the current date and time along with my initials into an open template. After inserting the snippet I wanted my cursor to be positioned in the middle of the comment so I could immediately begin writing some notes.

ColdFusion Builder snippets

I thought this was done by using the start text and end text fields in the Snippet dialog but no matter what I tried it wouldn’t work. ColdFusion Builder, or perhaps Eclipse itself, kept trimming line breaks from both the start text and end text. After a few minutes of frustration I decided to edit the snippet manually.

I opened the Eclipse preferences window and typed snippet into the search box. Then I clicked the menu option for ColdFusion Snippets so I could get the path to my snippets folder.

ColdFusion Builder snippet preferences

Finally, I opened my new snippet in MacVim and manually added the needed line breaks at the end of the start text XML node. You can see the line break between lines 6 and 7 in the screenshot below.

MacVIM

All that was left was refreshing the Snippets panel in ColdFusion Builder. While this whole process worked it sure seemed like a lot of effort. And I know I’ve created dozens of snippets like this in the past that I’m sure didn’t require editing outside of Eclipse. Admittedly, those snippets were probably created with CFEclipse and not ColdFusion Builder. If anyone knows a better way would you mind posting a comment to this post? Thanks!

comments powered by Disqus

Recent Posts

About

Aaron West's technology blog