Alpha - Code Completion

2 views
Skip to first unread message

Rob Rohan

unread,
Nov 30, 2008, 1:57:54 AM11/30/08
to cftex...@googlegroups.com
Hey everyone,

So far the most requested bit for cftextmate (that I've heard) is the
ability to get code completing on tags. I've add the feature to
cftextmate, but the functionality is pretty alpha. It works sometimes
though, and it's actually quite helpful.

To use it you have to be in a tag. When you type < it'll auto
complete to <|>. At this point if you hit ctrl+space bar (or alt+esc)
you should get a list of all the cf tags (as seen in the attached shot)

Picture 1.png
Picture 2.png

Andrew Hewitt

unread,
Nov 30, 2008, 3:35:00 PM11/30/08
to cftex...@googlegroups.com
When I tried it I get the following:

"/tmp/temp_textmate.eOyEc9:3: undefined method "

I'm sure it's user error, any suggestions?

You can start typing to select a tag or use the down / up arrows (I
wish ctrl+p and ctrl+n worked, but eh).

Once you have a tag chosen, hit the space bar to add a space, and then
another ctrl+space will bring up the attribute list:





Currently I am only generating this off the latest cfml stuff (no
railo or bluedragon stuff just yet).

If you want to play around with this you can download it here:

http://s3.amazonaws.com/software.robrohan.com/CFTextMate/Alpha/ColdFusion.tmbundle.zip


rob







Rob Rohan

unread,
Nov 30, 2008, 4:45:15 PM11/30/08
to cftex...@googlegroups.com
It might be, and I should have mentioned this, that the version of textmate you are using is not the cutting edge version.   My TextMate -> Prefereces -> Software Update is set to Cutting-Edge and I am running build 1496

Andrew Hewitt

unread,
Nov 30, 2008, 6:22:50 PM11/30/08
to cftex...@googlegroups.com
Well, though I can't test it I just wanted to say the screenshots look awesome. From what I can tell you are well on your way to doing tag/function insights, sort of similar to what's in dreamweaver or eclipse right? Would we be able to type say cffile and click ctrl+space and choose one attribute and then ctrl+space again and pick another? What about say in functions without using tab triggers such as if I typed: listFindNoCase("value1,value2", could I then click ctrl+space and see that the remaining attributes are "value, delimiter" and be able to choose the value attribute?

Rob Rohan

unread,
Nov 30, 2008, 8:48:29 PM11/30/08
to cftex...@googlegroups.com
From what I can tell you are well on your way to doing tag/function insights, sort of similar to what's in dreamweaver or eclipse right? 

Yup, yup.

Would we be able to type say cffile and click ctrl+space and choose one attribute and then ctrl+space again and pick another? 

Yeah that's how it works right now (at least on my box).  I am a bit bummed it doesn't work for you, I'll need to do more testing.

What about say in functions without using tab triggers such as if I typed: listFindNoCase("value1,value2", could I then click ctrl+space and see that the remaining attributes are "value, delimiter" and be able to choose the value attribute?

No functions just yet.  But I think  functions are less critical than tags.  They often use the same inputs whereas something like cffile could have just the most random of combinations which makes snippets a bit less helpful (at least auto generated snippets)

Andrew Hewitt

unread,
Nov 30, 2008, 10:35:20 PM11/30/08
to cftex...@googlegroups.com
Well if it helps here's the full error I'm getting after typing cffile for instance:

/Applications/TextMate.app/Contents/SharedSupport/Support/lib/osx/plist.bundle: dlopen(/Applications/TextMate.app/Contents/SharedSupport/Support/lib/osx/plist.bundle, 9): no suitable image found.  Did find: (LoadError)
    /Applications/TextMate.app/Contents/SharedSupport/Support/lib/osx/plist.bundle: mach-o, but wrong architecture - /Applications/TextMate.app/Contents/SharedSupport/Support/lib/osx/plist.bundle    from /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ui.rb:3
    from /Applications/TextMate.app/Contents/SharedSupport/Support/lib/codecompletion.rb:7:in /bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 3: syntax error: unexpected end of filerequire'
    from /tmp/temp_textmate.MZDTqj:2

Rob Rohan

unread,
Dec 1, 2008, 4:20:20 AM12/1/08
to cftex...@googlegroups.com
Hum, are you running a PPC Mac?

Andrew Hewitt

unread,
Dec 1, 2008, 12:22:52 PM12/1/08
to cftex...@googlegroups.com
No, an intel Mac 3,1 from late 2007.

gwiz

unread,
Dec 2, 2008, 1:04:08 PM12/2/08
to cftextmate
Thanks. This is working for me. Also thank you Rob, for stepping up to
this project.
>  Picture 1.png
> 55KViewDownload
>
>
>
> You can start typing to select a tag or use the down / up arrows (I  
> wish ctrl+p and ctrl+n worked, but eh).
>
> Once you have a tag chosen, hit the space bar to add a space, and then  
> another ctrl+space will bring up the attribute list:
>
>  Picture 2.png
> 59KViewDownload
>
>
>
> Currently I am only generating this off the latest cfml stuff (no  
> railo or bluedragon stuff just yet).
>
> If you want to play around with this you can download it here:
>
> http://s3.amazonaws.com/software.robrohan.com/CFTextMate/Alpha/ColdFu...
>
> rob

Rob Rohan

unread,
Dec 2, 2008, 2:48:08 PM12/2/08
to cftex...@googlegroups.com
Excellent, it's good to know it works on at least one other box. I am
still trying to figure out what's going on on Andrew's computer

Oh, don't thank me, thank http://daemon.com.au ^_^

Nando

unread,
Jan 1, 2009, 6:57:38 PM1/1/09
to cftextmate
I had to enable the cutting edge version to get this to work. Before I
did that, I was getting the same error as Andrew.

Rob Rohan

unread,
Jan 1, 2009, 7:02:03 PM1/1/09
to cftex...@googlegroups.com
Good to know, Thanks Nando

Nando

unread,
Jan 1, 2009, 7:32:26 PM1/1/09
to cftextmate
Actually, now I see it's not exactly true. The error went away, but I
get a list of HTML tags instead of CF tags.

I'm not sure if I have the bundle installed correctly. I simply
downloaded it, found the Bundles directory under TextMate.app in
Finder (right click on it > Show Package Contents) and dropped it in
there. Then I selected Bundes > Bundles Editor > Reload Bundles and
ColdFusion shows up in the bundles list. Typing a tag name, cfset for
instance, and then hitting tab works, it completes the tag and fills
in the attributes.

?

Nando

Rob Rohan

unread,
Jan 1, 2009, 7:53:09 PM1/1/09
to cftex...@googlegroups.com
I think you have it installed fine. I think there is a bug in the way
it figures out what context you are in to do tags. It's unreliable
for cftags, but seems to be fine for attributes. For now, I just use
it for attributes.
Reply all
Reply to author
Forward
0 new messages