Snippets Cheat Sheet?

29 views
Skip to first unread message

Matt Quackenbush

unread,
Oct 23, 2009, 2:07:19 PM10/23/09
to cfeclip...@googlegroups.com
There use to be a snippets cheat sheet type of page on the CFE website, but the trac link now brings up a nice, pretty 404.  I have been searching for over an hour trying to find such a critter, but with no luck.  Does anyone happen to have a link to something of this sort?

I am specifically looking for details on the supported syntax and built-in variables (e.g. $${DATE}, etc) in Eclipse/CFE/CFB.  For example, this (obviously) does not work as-is, and may not even be possible, but can I do something like...

$${Required?:if (true) requied}

Thanks in advance.

Jim Priest

unread,
Oct 23, 2009, 2:11:21 PM10/23/09
to cfeclip...@googlegroups.com
On Fri, Oct 23, 2009 at 2:07 PM, Matt Quackenbush <quack...@gmail.com> wrote:
> There use to be a snippets cheat sheet type of page on the CFE website, but
> the trac link now brings up a nice, pretty 404.  I have been searching for

http://trac.cfeclipse.org/wiki/CFSnippets

Tip: On the Trac homepage click Index
(http://trac.cfeclipse.org/wiki/TitleIndex) then find the page you are
looking for (ignore spam)

This is on my todo list - if anyone wants to help out cleaning up spam
- please let me know and I will get you and acct setup on Trac.

Jim

Matt Quackenbush

unread,
Oct 23, 2009, 2:17:15 PM10/23/09
to cfeclip...@googlegroups.com
Thank you, Jim.  I should have known that you'd have the correct link on the tip of your fingers.  ;-)

Do you know if there is any sort of conditional evaluation functionality in snippets?  (The cheat sheet doesn't show anything, and none of the things I've tried have worked, so I'm expecting the answer is that it is not supported.)

Jim Priest

unread,
Oct 23, 2009, 3:05:06 PM10/23/09
to cfeclip...@googlegroups.com
I don't think that's possible.

What OS are you using? I've really dumped snippets in favor of
AutoHotKey (on windows)

http://www.thecrumb.com/tag/autohotkey/

Gives you a lot more power and flexibility....

Jim
--
Jim Priest - thecrumb.com
Triangle Area ColdFusion User Group - tacfug.org
--
North Carolina ColdFusion Conference - CFinNC.com (It's free!)
--
Without deviation from the norm, progress is not possible. ~ Frank Zappa

Jacob Munson

unread,
Oct 23, 2009, 5:29:22 PM10/23/09
to cfeclip...@googlegroups.com
What OS are you using?  I've really dumped snippets in favor of
AutoHotKey (on windows)

Ok, I just installed AutoHotkey earlier (after reading this message) and so far I LOVE it!  I've already setup a few snippets to insert chunks of code. 

The only thing I wish I could do (I can't find this in the help file)...say I create a hotkey that inserts this code:
structKeyExists( ,"")
I'd like to instruct AutoHotkey that after it inserts the code, I want it to put the cursor after the first parenthesis, so I can immediately start typing the struct name instead of having to move my cursor back to the appropriate place.  There might be a way to do this, but if so I couldn't find it.

You know, when you find a tool like this that really "automates" your PC usage...sometimes you go a bit nuts with it and find yourself wishing for the stars.  :)


=====================
Jake Munson
Kuna, ID, USA
http://www.techfeed.net/blog/
http://www.cfquickdocs.com/
http://cfformprotect.riaforge.org/

Jim Priest

unread,
Oct 23, 2009, 5:38:38 PM10/23/09
to cfeclip...@googlegroups.com
On Fri, Oct 23, 2009 at 5:29 PM, Jacob Munson <yaco...@gmail.com> wrote:
> The only thing I wish I could do (I can't find this in the help file)...say
> I create a hotkey that inserts this code:
> structKeyExists( ,"")
> I'd like to instruct AutoHotkey that after it inserts the code, I want it to
> put the cursor after the first parenthesis, so I can immediately start
> typing the struct name instead of having to move my cursor back to the
> appropriate place.  There might be a way to do this, but if so I couldn't
> find it.

Jacob - see the example here:
http://www.thecrumb.com/2009/08/18/autohotkey-week-day-2-%E2%80%93-text-manipulation/

See the example near the bottom - remember Autohotkey is simply
automating the manipulation of your keyboard - so figure out how you
want to insert the text and then what you need to push to get the
cursor where you want it...

So here I'm simply entering in a cfif statement
Send, <cfif>{Enter}{Enter}<cfelse>{Enter}{Enter}</cfelse></cfif>
Then I click the up key three times
Send {UP 3}
Then I click the left arrow key 2 times
Send {LEFT 2}

Let me know if that helps...
Jim

Jacob Munson

unread,
Oct 23, 2009, 5:48:18 PM10/23/09
to cfeclip...@googlegroups.com
Yes, perfect.  Thanks Jim!

denstar

unread,
Oct 23, 2009, 5:57:38 PM10/23/09
to cfeclip...@googlegroups.com
Just to toss it out there, since it's sorta similar to snippets and hotkeys:

There's also the "Templates" stuff (Preferences > CFEclipse > Editor >
Templates).

It ain't nearly as cool as it can be, but I'm using 'em a good bit, nonetheless.

--
Jealousy - that jumble of secret worship and ostensible aversion.
Emile M. Cioran

Reply all
Reply to author
Forward
0 new messages