Apr
18

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.

Continue Reading

Aaron West's Gravatar
About this post:

This entry was posted by Aaron West on April 18, 2011 at 9:00 AM. It was filed in the following categories: ColdFusion, ColdFusion Builder. It has been viewed 20436 times and has 6 comments.

6 Responses to How to Position the Cursor in the Middle of a ColdFusion Builder Snippet

  1. Try creating the empty lines / line breaks in the snippet by hitting Shift-Enter instead of just Enter. That seems to preserve the empty lines, and if you add a blank line at the start of the End Block it looks like that's where the cursor will end up when the snippet is executed.

  2. Brian, I tried your suggestion using shift+enter and that didn't make a difference. Neither did the blank line suggestion in the end text which is what I thought would've worked as I recall it working in the past. What version of CF Builder are you using?

  3. I'm using the beta of CF Builder 2 (sorry, I didn't mention that because I assumed we were only talking about CF Builder 2).

  4. For most of my development I'm using CF Builder 1 update 1. Good to know this snippet problem occurs in both versions. Thanks Brian.

  5. Jay Dee

    During last weeks CF Builder webcasts, specifically one on CFBuilder, it was mentioned that $${CP} (dollar, dollar, open curly brace "CP", for cursor position, close curly brace) would position the cursor.
    Didn't work for me, just added a dialogue item as other variable definitions did.
    So, still searching myself.

  6. Jay Dee

    OK, was trying to remember this to clean up some old snippets and revisited it. In ColdFusion Builder 2, the control-enter works for me. I also tried "<cfset" in the start block and " $${} />" in the close block Dollar Dollar open brace close brace slash greater-than sign in case the code doesn't display. It pops an empty dialog that I have to press return or click "OK", but it leaves my cursor in the right place with no extra line breaks like the control-enter does...