CFWheels for Sublime Text 2

294 views
Skip to first unread message

Tim B

unread,
Jul 9, 2012, 4:07:14 PM7/9/12
to cfwh...@googlegroups.com
Just thought I'd let you guys know that I added CFWheels functionality to the official Sublime Text 2 Coldfusion Plugin: https://github.com/timsayshey/Sublime-Coldfusion-With-CFWheels

Enjoy :)

Tim B

unread,
Jul 9, 2012, 5:58:12 PM7/9/12
to cfwh...@googlegroups.com
@Atomi - Good call, got it separated out from your plugin. Also can you add it to the Sublime Text github page?

@everyone else - Old link no longer works, new link below:
https://github.com/timsayshey/Sublime-Text-CFWheels

For best results I recommend using it with Atomi's Coldfusion plugin:
https://github.com/SublimeText/ColdFusion


On Monday, July 9, 2012 3:43:57 PM UTC-5, atomi wrote:
Hey! 
I'm not sure you need to fork the ColdFusion package. Sublime Text will pick up multiple sublime-completion files so you can always create a secernate package specific to CFWheels.

Unfortunately, I won't be merging framework code completion, which is why I mention it. Nice work though for sure - it's really helpful!

atomi

unread,
Jul 9, 2012, 6:39:24 PM7/9/12
to cfwh...@googlegroups.com
@TimB done!

By the way rather than just copying the tmlanguage files, if you need to highlight special function or tags for CFWheels you can just use 


<key>include</key>
<string>text.html.cfm</string>

or
<key>include</key>
<string>source.cfscript</string>


in your custom cfwheels tmlanguage files. That way you won't have to constantly update your repo with new changes to the ColdFusion tmlanguage files.

If you need help with it DM on twitter or email me.
Cheers!

Russ Johnson

unread,
Jul 12, 2012, 11:11:34 AM7/12/12
to cfwh...@googlegroups.com
Tim,

Wanted to check this out to decide if I wanted to bother updating my CFWheels Textmate bundle to work better with Sublime or just switch to yours but Im running into something that Im not sure is how you intended it.

When I type link to and hit enter on the popup completion, I get the following in my editor:

#linkTo( text(string), confirm(string), route(string), controller(string), action(string), key(any), params(string), anchor(string), onlyPath(boolean), host(string), protocol(string), port(numeric), href(string) )#

as I tab through the attributes, it highlights the entire section like text(string) so as I type the value, I also have to type the attribute such as text="My Link"…  is this how you intended this to work? 

My completions in the Textmate bundle put extra tab stops in the actual value spot so you only have to type the value and not the attribute as well..


Here is a comparison of my completion syntax with yours…

Yours:

linkTo(${1: ${2:text(string)}, ${3:confirm(string)}, ${4:route(string)}, ${5:controller(string)}, ${6:action(string)}, ${7:key(any)}, ${8:params(string)}, ${9:anchor(string)}, ${10:onlyPath(boolean)}, ${11:host(string)}, ${12:protocol(string)}, ${13:port(numeric)}, ${14:href(string)} })

Mine:

linkTo(${1:${2:text="$3"}${4:, confirm="$5"}${6:, route="$7"}${8:, controller="$9"}${10:, action="$11"}${12:, key="$13"}${14:, params="$15"}${16:, anchor="$17"}${18:, onlyPath="$19"}${20:, host="$21"}${22:, protocol="$23"}${24:, port="$25"}})$0

The way mine is setup you never have to type the actual attribute. I guess Im just wondering if you intended it to work that way. 



Russ Johnson
@russ_johnson
ru...@angry-fly.com
www.angry-fly.com


 

--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/IkPjctacqzwJ.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.

Tim Badolato

unread,
Jul 12, 2012, 11:54:19 AM7/12/12
to cfwh...@googlegroups.com
Interesting. Well my personal preference would be to use it the way you just described it but I just tried and I couldn't get it to work using your formatting.

I'll accept a pull request if you can get it working. Just tweak the import.cfm file to generate the definitions then stick them in the sublime-completions file.

Let me know.

Thanks Russ!

If we can't get it to work it might be better just to update your plugin to work with sublime.

image001.gif

Russ Johnson

unread,
Jul 12, 2012, 4:39:10 PM7/12/12
to cfwh...@googlegroups.com
Just sent you a pull request and now the tab completions are working just like they did in my CFWheels Textmate bundle.  Added the snippets from the TextMate bundle and starting to work on integration some of the helpers like "Create partial from selection" and stuff like that…


Russ Johnson
@russ_johnson
ru...@angry-fly.com
www.angry-fly.com


 

On Jul 12, 2012, at 11:54 AM, Tim Badolato wrote:

Interesting. Well my personal preference would be to use it the way you just described it but I just tried and I couldn't get it to work using your formatting.

I'll accept a pull request if you can get it working. Just tweak the import.cfm file to generate the definitions then stick them in the sublime-completions file.

Let me know.

Thanks Russ!

If we can't get it to work it might be better just to update your plugin to work with sublime.


On Thu, Jul 12, 2012 at 10:11 AM, Russ Johnson <russ.c...@gmail.com> wrote:
Tim,

Wanted to check this out to decide if I wanted to bother updating my CFWheels Textmate bundle to work better with Sublime or just switch to yours but Im running into something that Im not sure is how you intended it.

When I type link to and hit enter on the popup completion, I get the following in my editor:

#linkTo( text(string), confirm(string), route(string), controller(string), action(string), key(any), params(string), anchor(string), onlyPath(boolean), host(string), protocol(string), port(numeric), href(string) )#

as I tab through the attributes, it highlights the entire section like text(string) so as I type the value, I also have to type the attribute such as text="My Link"…  is this how you intended this to work? 

My completions in the Textmate bundle put extra tab stops in the actual value spot so you only have to type the value and not the attribute as well..


Here is a comparison of my completion syntax with yours…

Yours:

linkTo(${1: ${2:text(string)}, ${3:confirm(string)}, ${4:route(string)}, ${5:controller(string)}, ${6:action(string)}, ${7:key(any)}, ${8:params(string)}, ${9:anchor(string)}, ${10:onlyPath(boolean)}, ${11:host(string)}, ${12:protocol(string)}, ${13:port(numeric)}, ${14:href(string)} })

Mine:

linkTo(${1:${2:text="$3"}${4:, confirm="$5"}${6:, route="$7"}${8:, controller="$9"}${10:, action="$11"}${12:, key="$13"}${14:, params="$15"}${16:, anchor="$17"}${18:, onlyPath="$19"}${20:, host="$21"}${22:, protocol="$23"}${24:, port="$25"}})$0

The way mine is setup you never have to type the actual attribute. I guess Im just wondering if you intended it to work that way. 


Russ Johnson
@russ_johnson
ru...@angry-fly.com
www.angry-fly.com

<image001.gif>
 

Tim Badolato

unread,
Jul 12, 2012, 4:52:34 PM7/12/12
to cfwh...@googlegroups.com
Pull request merged-- You're the man, Russ!

image001.gif

Jacob

unread,
Jan 17, 2013, 1:47:40 PM1/17/13
to cfwh...@googlegroups.com
Thank you! Just installed. Kicks ass!


On Monday, July 9, 2012 1:07:14 PM UTC-7, Tim B wrote:

Chris Geirman

unread,
Jan 17, 2013, 9:55:25 PM1/17/13
to ColdFusion on Wheels
N00b question. I've installed Sublime and have managed to get the coldfusion package installed, but I'm not sure how to install the CFWheels package. The site says "Just add it to your packages folder." but I'm not sure how or where. I see...
D:\Program Files\Sublime Text 2\Pristine Packages

but nothing in that folder looks like what I found in the zip file here...
https://github.com/timsayshey/Sublime-Text-CFWheels (which is different than the above URL, which 404ed for me BTW)

Can I get a hint?


--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/kszTKsVsq3oJ.

Tim Badolato

unread,
Jan 17, 2013, 10:19:48 PM1/17/13
to cfwh...@googlegroups.com
I put the CFWheels package folder in the following spot: 
C:\Users\Tim\AppData\Roaming\Sublime Text 2\Packages\CFWheels

Should work for you.

Chris Geirman

unread,
Jan 17, 2013, 10:32:28 PM1/17/13
to ColdFusion on Wheels
Thank you! That's got me there! 
Message has been deleted

Tim Badolato

unread,
Jan 23, 2013, 4:12:45 PM1/23/13
to cfwh...@googlegroups.com
Yep, thats correct. I would have updated my original post with the new link but there was no edit option so I had to post it separately. Sorry about that.

On Wed, Jan 23, 2013 at 2:48 PM, Alex Sante <alexand...@gmail.com> wrote:
This link did not work, but after a quick search I found https://github.com/timsayshey/Sublime-Text-CFWheels so i'm guessing this is the new link.


On Monday, July 9, 2012 4:07:14 PM UTC-4, Tim B wrote:
Just thought I'd let you guys know that I added CFWheels functionality to the official Sublime Text 2 Coldfusion Plugin: https://github.com/timsayshey/Sublime-Coldfusion-With-CFWheels

Enjoy :)

--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.

Brian Lang

unread,
Jan 29, 2013, 4:54:49 PM1/29/13
to cfwh...@googlegroups.com
I decided to give Sublime Text 2 another try today after discarding it as both "too basic" and "too complicated" last summer.
Found and watched parts of a free tutorial on TutsPlus.com (https://tutsplus.com/course/improve-workflow-in-sublime-text-2/) which helped me learn a bunch of features of the app.

I found and installed the Package Control plugin. http://wbond.net/sublime_packages/package_control
Then I found and installed the ColdFusion plugin. https://github.com/SublimeText/ColdFusion
So far so good.

I also found and manually installed the CFWheels plugin https://github.com/timsayshey/Sublime-Text-CFWheels
Again, so far so good.

I have noticed something while typing code. When I start typing CFML code, like <cfqu for cfquery, the code hinting pops up with a list of matching tags. I select what I want, then I get code hinting for the attributes for the selected tag. But when I select a function like DateFormat() or a CFWheels function like LinkTo(), I get the full function definition populated with all attributes. Then I have to go and delete the attributes I don't need or don't want to set explicitly. Is this normal? Is there a way to get functions to populate like cfml and html tags populate?? Does my description of the issue make sense??

Brian

Chris Peters

unread,
Jan 29, 2013, 6:08:36 PM1/29/13
to cfwh...@googlegroups.com
I think the preferred way of working with the function syntax is to hit tab until your cursor highlights the entire argument, hit backspace if you don't want that argument, hit tab until your cursor is inside an argument that you want, type in the value, and keep repeating while either typing or hitting backspace. Hope that makes sense.

To me, it's a tad annoying, so I go with straight typing. I know the language and framework well enough to use them with little need for reference. When I do need reference, I just look up the function on cfwheels.org.


To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.

To post to this group, send email to cfwh...@googlegroups.com.

Brian Lang

unread,
Jan 30, 2013, 1:23:04 PM1/30/13
to cfwh...@googlegroups.com
Thanks Chris. I'm just learning ST2. I tried it out, and it works like you said it would.

Brian.

Chris Peters

unread,
Jan 30, 2013, 1:44:50 PM1/30/13
to cfwh...@googlegroups.com
You're welcome, Brian. I think I figured out that bit from watching a video that Russ Johnson did about his CFWheels plugin for Textmate back in the day.
Reply all
Reply to author
Forward
0 new messages